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

Side by Side 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, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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()
OLDNEW
« 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