| 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 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 Loading... |
| 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() |
| OLD | NEW |