Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10122)

Unified Diff: chrome/common/extensions/docs/server2/example_zipper_test.py

Issue 10878056: Extensions Docs Server: Fix samples page and ExampleZipper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test + fixes Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/example_zipper_test.py
diff --git a/chrome/common/extensions/docs/server2/example_zipper_test.py b/chrome/common/extensions/docs/server2/example_zipper_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..eaf4744a3fa1c9fb972cef7143aeca465bb39935
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/example_zipper_test.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import unittest
+
+from compiled_file_system import CompiledFileSystem
+from example_zipper import ExampleZipper
+from in_memory_object_store import InMemoryObjectStore
+from local_file_system import LocalFileSystem
+from memcache_file_system import MemcacheFileSystem
+
+class ExampleZipperTest(unittest.TestCase):
+ def setUp(self):
+ object_store = InMemoryObjectStore('')
+ self._file_system = MemcacheFileSystem(LocalFileSystem('test_data'),
+ object_store)
+ self._example_zipper = ExampleZipper(
+ self._file_system,
+ CompiledFileSystem.Factory(self._file_system, object_store),
+ 'example_zipper')
+
+ def testCreateZip(self):
+ # Cache manifest.json as unicode and make sure ExampleZipper doesn't error.
+ self._file_system.ReadSingle('example_zipper/basic/manifest.json')
+ self.assertTrue(len(self._example_zipper.Create('basic')) > 0)
+
+if __name__ == '__main__':
+ unittest.main()
« no previous file with comments | « chrome/common/extensions/docs/server2/example_zipper.py ('k') | chrome/common/extensions/docs/server2/handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698