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

Side by Side Diff: chrome/common/extensions/docs/server2/cron_servlet_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 import unittest 6 import unittest
7 7
8 from appengine_wrappers import GetAppVersion 8 from appengine_wrappers import GetAppVersion
9 from app_yaml_helper import AppYamlHelper 9 from app_yaml_helper import AppYamlHelper
10 from cron_servlet import CronServlet 10 from cron_servlet import CronServlet
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 self.assertEqual(len(first_run_file_systems), len(delegate.file_systems)) 79 self.assertEqual(len(first_run_file_systems), len(delegate.file_systems))
80 for i, second_run_file_system in enumerate(delegate.file_systems): 80 for i, second_run_file_system in enumerate(delegate.file_systems):
81 self.assertTrue(*second_run_file_system.CheckAndReset( 81 self.assertTrue(*second_run_file_system.CheckAndReset(
82 read_count=0, 82 read_count=0,
83 stat_count=first_run_file_systems[i].GetStatCount())) 83 stat_count=first_run_file_systems[i].GetStatCount()))
84 84
85 def testSafeRevision(self): 85 def testSafeRevision(self):
86 test_data = { 86 test_data = {
87 'api': { 87 'api': {
88 '_manifest_features.json': '{}' 88 '_api_features.json': '{}',
89 '_manifest_features.json': '{}',
90 '_permission_features.json': '{}',
89 }, 91 },
90 'docs': { 92 'docs': {
91 'examples': { 93 'examples': {
92 'examples.txt': 'examples.txt contents' 94 'examples.txt': 'examples.txt contents'
93 }, 95 },
94 'server2': { 96 'server2': {
95 'app.yaml': AppYamlHelper.GenerateAppYaml('2-0-8') 97 'app.yaml': AppYamlHelper.GenerateAppYaml('2-0-8')
96 }, 98 },
97 'static': { 99 'static': {
98 'static.txt': 'static.txt contents' 100 'static.txt': 'static.txt contents'
99 }, 101 },
100 'templates': { 102 'templates': {
101 'public': { 103 'public': {
102 'apps': { 104 'apps': {
103 'storage.html': 'storage.html contents' 105 'storage.html': 'storage.html contents'
104 }, 106 },
105 'extensions': { 107 'extensions': {
106 'storage.html': 'storage.html contents' 108 'storage.html': 'storage.html contents'
107 }, 109 },
108 }, 110 },
109 'json': { 111 'json': {
110 'content_providers.json': ReadFile('%s/content_providers.json' % 112 'content_providers.json': ReadFile('%s/content_providers.json' %
111 JSON_PATH), 113 JSON_PATH),
112 'manifest.json': '{}', 114 'manifest.json': '{}',
115 'permissions.json': '{}',
113 'strings.json': '{}', 116 'strings.json': '{}',
114 'apps_sidenav.json': '{}', 117 'apps_sidenav.json': '{}',
115 'extensions_sidenav.json': '{}', 118 'extensions_sidenav.json': '{}',
116 }, 119 },
117 } 120 }
118 } 121 }
119 } 122 }
120 123
121 updates = [] 124 updates = []
122 125
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 CronServlet(Request.ForTest('trunk'), delegate_for_test=delegate).Get() 224 CronServlet(Request.ForTest('trunk'), delegate_for_test=delegate).Get()
222 self.assertEqual(AppYamlHelper.GenerateAppYaml('2-1-0'), 225 self.assertEqual(AppYamlHelper.GenerateAppYaml('2-1-0'),
223 file_systems[-1].ReadSingle(app_yaml_path).Get()) 226 file_systems[-1].ReadSingle(app_yaml_path).Get())
224 self.assertEqual('y u not update!', 227 self.assertEqual('y u not update!',
225 file_systems[-1].ReadSingle(storage_html_path).Get()) 228 file_systems[-1].ReadSingle(storage_html_path).Get())
226 self.assertEqual('important content!', 229 self.assertEqual('important content!',
227 file_systems[-1].ReadSingle(static_txt_path).Get()) 230 file_systems[-1].ReadSingle(static_txt_path).Get())
228 231
229 if __name__ == '__main__': 232 if __name__ == '__main__':
230 unittest.main() 233 unittest.main()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/cron_servlet.py ('k') | chrome/common/extensions/docs/server2/features_bundle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698