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

Side by Side Diff: chrome/common/extensions/docs/server2/api_data_source_test.py

Issue 491653002: Docserver: Use GitilesFileSystem instead of SubversionFileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
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 unittest 6 import unittest
7 7
8 from api_data_source import APIDataSource 8 from api_data_source import APIDataSource
9 from extensions_paths import CHROME_EXTENSIONS 9 from extensions_paths import CHROME_EXTENSIONS
10 from servlet import Request 10 from servlet import Request
11 from server_instance import ServerInstance 11 from server_instance import ServerInstance
12 from test_data.api_data_source.canned_trunk_fs import CANNED_TRUNK_FS_DATA 12 from test_data.api_data_source.canned_master_fs import CANNED_MASTER_FS_DATA
13 from test_file_system import TestFileSystem 13 from test_file_system import TestFileSystem
14 14
15 15
16 class APIDataSourceTest(unittest.TestCase): 16 class APIDataSourceTest(unittest.TestCase):
17 def setUp(self): 17 def setUp(self):
18 self.server_instance = ServerInstance.ForTest( 18 self.server_instance = ServerInstance.ForTest(
19 TestFileSystem(CANNED_TRUNK_FS_DATA, relative_to=CHROME_EXTENSIONS)) 19 TestFileSystem(CANNED_MASTER_FS_DATA, relative_to=CHROME_EXTENSIONS))
20 20
21 def testGet(self): 21 def testGet(self):
22 api_ds = APIDataSource(self.server_instance, Request.ForTest('/')) 22 api_ds = APIDataSource(self.server_instance, Request.ForTest('/'))
23 jsc_view = api_ds.get('extensions').get('tester') 23 jsc_view = api_ds.get('extensions').get('tester')
24 funcs_arr = [{ 24 funcs_arr = [{
25 'availability': None, 25 'availability': None,
26 'callback': { 26 'callback': {
27 'name': 'callback', 27 'name': 'callback',
28 'optional': False, 28 'optional': False,
29 'parameters': [{ 29 'parameters': [{
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 'parentName': 'TypeA', 192 'parentName': 'TypeA',
193 'properties': [], 193 'properties': [],
194 'returns': None 194 'returns': None
195 }], 195 }],
196 'simple_type': 'object' 196 'simple_type': 'object'
197 }] 197 }]
198 self.assertEquals(types_arr, jsc_view['types']) 198 self.assertEquals(types_arr, jsc_view['types'])
199 199
200 if __name__ == '__main__': 200 if __name__ == '__main__':
201 unittest.main() 201 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698