OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 import os |
| 7 import unittest |
| 8 |
| 9 from compiled_file_system import CompiledFileSystem |
| 10 from example_zipper import ExampleZipper |
| 11 from in_memory_object_store import InMemoryObjectStore |
| 12 from local_file_system import LocalFileSystem |
| 13 from memcache_file_system import MemcacheFileSystem |
| 14 |
| 15 class ExampleZipperTest(unittest.TestCase): |
| 16 def setUp(self): |
| 17 object_store = InMemoryObjectStore('') |
| 18 self._file_system = MemcacheFileSystem(LocalFileSystem('test_data'), |
| 19 object_store) |
| 20 self._example_zipper = ExampleZipper( |
| 21 self._file_system, |
| 22 CompiledFileSystem.Factory(self._file_system, object_store), |
| 23 'example_zipper') |
| 24 |
| 25 def testCreateZip(self): |
| 26 # Cache manifest.json as unicode and make sure ExampleZipper doesn't error. |
| 27 self._file_system.ReadSingle('example_zipper/basic/manifest.json') |
| 28 self.assertTrue(len(self._example_zipper.Create('basic')) > 0) |
| 29 |
| 30 if __name__ == '__main__': |
| 31 unittest.main() |
OLD | NEW |