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

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

Issue 575613003: Docserver: Gitiles auth and cron refactoring. (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 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 cStringIO import StringIO 6 from cStringIO import StringIO
7 import json 7 import json
8 import unittest 8 import unittest
9 from zipfile import ZipFile 9 from zipfile import ZipFile
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 '\n'.join(text[1] for text in _MARKDOWN_CONTENT), 196 '\n'.join(text[1] for text in _MARKDOWN_CONTENT),
197 'dir7', 197 'dir7',
198 '0') 198 '0')
199 self._assertContent( 199 self._assertContent(
200 'noextension content', 'text/plain', 200 'noextension content', 'text/plain',
201 self._content_provider.GetContentAndType('noextension').Get()) 201 self._content_provider.GetContentAndType('noextension').Get())
202 self.assertRaises( 202 self.assertRaises(
203 FileNotFoundError, 203 FileNotFoundError,
204 self._content_provider.GetContentAndType('dir6').Get) 204 self._content_provider.GetContentAndType('dir6').Get)
205 205
206 def testCron(self): 206 def testRefresh(self):
207 # Not entirely sure what to test here, but get some code coverage. 207 # Not entirely sure what to test here, but get some code coverage.
208 self._content_provider.Cron().Get() 208 self._content_provider.Refresh().Get()
209 209
210 210
211 if __name__ == '__main__': 211 if __name__ == '__main__':
212 unittest.main() 212 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698