OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import json | 6 import json |
7 import os | 7 import os |
8 import sys | 8 import sys |
9 import unittest | 9 import unittest |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 'fake_channel', | 66 'fake_channel', |
67 api_data_factory, | 67 api_data_factory, |
68 self._fake_api_list_data_source_factory, | 68 self._fake_api_list_data_source_factory, |
69 self._fake_intro_data_source_factory, | 69 self._fake_intro_data_source_factory, |
70 self._fake_samples_data_source_factory, | 70 self._fake_samples_data_source_factory, |
71 self._fake_sidenav_data_source_factory, | 71 self._fake_sidenav_data_source_factory, |
72 compiled_fs_factory, | 72 compiled_fs_factory, |
73 reference_resolver_factory, | 73 reference_resolver_factory, |
74 '.', | 74 '.', |
75 '.', | 75 '.', |
76 '/static')) | 76 '')) |
77 | 77 |
78 def testSimple(self): | 78 def testSimple(self): |
79 self._base_path = os.path.join(self._base_path, 'simple') | 79 self._base_path = os.path.join(self._base_path, 'simple') |
80 fetcher = LocalFileSystem(self._base_path) | 80 fetcher = LocalFileSystem(self._base_path) |
81 compiled_fs_factory = CompiledFileSystem.Factory( | 81 compiled_fs_factory = CompiledFileSystem.Factory( |
82 fetcher, | 82 fetcher, |
83 ObjectStoreCreator.ForTest()) | 83 ObjectStoreCreator.ForTest()) |
84 t_data_source = self._CreateTemplateDataSource( | 84 t_data_source = self._CreateTemplateDataSource( |
85 compiled_fs_factory, | 85 compiled_fs_factory, |
86 ObjectStoreCreator.ForTest()) | 86 ObjectStoreCreator.ForTest()) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 compiled_fs_factory, | 129 compiled_fs_factory, |
130 api_data=json.loads(self._ReadLocalFile('test1.json')))) | 130 api_data=json.loads(self._ReadLocalFile('test1.json')))) |
131 self._RenderTest( | 131 self._RenderTest( |
132 'test2', | 132 'test2', |
133 self._CreateTemplateDataSource( | 133 self._CreateTemplateDataSource( |
134 compiled_fs_factory, | 134 compiled_fs_factory, |
135 api_data=json.loads(self._ReadLocalFile('test2.json')))) | 135 api_data=json.loads(self._ReadLocalFile('test2.json')))) |
136 | 136 |
137 if __name__ == '__main__': | 137 if __name__ == '__main__': |
138 unittest.main() | 138 unittest.main() |
OLD | NEW |