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

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

Issue 63203002: Docserver: Make the hand-written Cron methods run first rather than last, since (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jeffrey Created 7 years, 1 month 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
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 from copy import deepcopy 6 from copy import deepcopy
7 import json 7 import json
8 import unittest 8 import unittest
9 9
10 from compiled_file_system import CompiledFileSystem 10 from compiled_file_system import CompiledFileSystem
11 from features_bundle import FeaturesBundle 11 from features_bundle import FeaturesBundle
12 from future import Future
12 import manifest_data_source 13 import manifest_data_source
13 from object_store_creator import ObjectStoreCreator 14 from object_store_creator import ObjectStoreCreator
14 15
15 16
16 convert_and_annotate_docs = { 17 convert_and_annotate_docs = {
17 'name': { 18 'name': {
18 'example': "My {{title}}", 19 'example': "My {{title}}",
19 'name': 'name', 20 'name': 'name',
20 'level': 'required' 21 'level': 'required'
21 }, 22 },
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 'platforms': ['apps'], 240 'platforms': ['apps'],
240 'is_last': True 241 'is_last': True
241 } 242 }
242 ], 243 ],
243 'is_last': True 244 'is_last': True
244 } 245 }
245 ] 246 ]
246 247
247 class FakeFeaturesBundle(object): 248 class FakeFeaturesBundle(object):
248 def GetManifestFeatures(self): 249 def GetManifestFeatures(self):
249 return manifest_features 250 return Future(value=manifest_features)
250 251
251 class FakeServerInstance(object): 252 class FakeServerInstance(object):
252 def __init__(self): 253 def __init__(self):
253 self.features_bundle = FakeFeaturesBundle() 254 self.features_bundle = FakeFeaturesBundle()
254 self.object_store_creator = ObjectStoreCreator.ForTest() 255 self.object_store_creator = ObjectStoreCreator.ForTest()
255 256
256 mds = manifest_data_source.ManifestDataSource(FakeServerInstance(), None) 257 mds = manifest_data_source.ManifestDataSource(FakeServerInstance(), None)
257 self.assertEqual(expected_app, mds.get('apps')) 258 self.assertEqual(expected_app, mds.get('apps'))
258 259
259 if __name__ == '__main__': 260 if __name__ == '__main__':
260 unittest.main() 261 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698