OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 unittest | 8 import unittest |
9 import sys | 9 import sys |
10 | 10 |
11 from extensions_paths import EXTENSIONS | |
12 from fake_host_file_system_provider import FakeHostFileSystemProvider | 11 from fake_host_file_system_provider import FakeHostFileSystemProvider |
13 from server_instance import ServerInstance | 12 from server_instance import ServerInstance |
14 from test_data.canned_data import CANNED_API_FILE_SYSTEM_DATA | 13 from test_data.canned_data import CANNED_API_FILE_SYSTEM_DATA |
15 from whats_new_data_source import WhatsNewDataSource | 14 from whats_new_data_source import WhatsNewDataSource |
16 | 15 |
17 | 16 |
18 class WhatsNewDataSourceTest(unittest.TestCase): | 17 class WhatsNewDataSourceTest(unittest.TestCase): |
19 def testCreateWhatsNewDataSource(self): | 18 def testCreateWhatsNewDataSource(self): |
20 api_fs_creator = FakeHostFileSystemProvider(CANNED_API_FILE_SYSTEM_DATA) | 19 api_fs_creator = FakeHostFileSystemProvider(CANNED_API_FILE_SYSTEM_DATA) |
21 server_instance = ServerInstance.ForTest( | 20 server_instance = ServerInstance.ForTest( |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 ] | 90 ] |
92 expected_new_info_of_extensions.extend(expected_whats_new_changes_list) | 91 expected_new_info_of_extensions.extend(expected_whats_new_changes_list) |
93 | 92 |
94 whats_new_for_apps = whats_new_data_source.get('apps') | 93 whats_new_for_apps = whats_new_data_source.get('apps') |
95 whats_new_for_extension = whats_new_data_source.get('extensions') | 94 whats_new_for_extension = whats_new_data_source.get('extensions') |
96 self.assertEqual(expected_new_info_of_apps, whats_new_for_apps) | 95 self.assertEqual(expected_new_info_of_apps, whats_new_for_apps) |
97 self.assertEqual(expected_new_info_of_extensions, whats_new_for_extension) | 96 self.assertEqual(expected_new_info_of_extensions, whats_new_for_extension) |
98 | 97 |
99 if __name__ == '__main__': | 98 if __name__ == '__main__': |
100 unittest.main() | 99 unittest.main() |
OLD | NEW |