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

Unified Diff: chrome/common/extensions/docs/server2/host_file_system_creator_test.py

Issue 26418002: Docserver: Pull knowledge of host file systems into a single (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct similarity Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/host_file_system_creator_test.py
diff --git a/chrome/common/extensions/docs/server2/host_file_system_creator_test.py b/chrome/common/extensions/docs/server2/host_file_system_creator_test.py
deleted file mode 100755
index 19093942a898792732475dfb108a6dcc09489796..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/docs/server2/host_file_system_creator_test.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from caching_file_system import CachingFileSystem
-from file_system import FileNotFoundError
-from host_file_system_creator import HostFileSystemCreator
-from object_store_creator import ObjectStoreCreator
-from offline_file_system import OfflineFileSystem
-from test_data.canned_data import CANNED_API_FILE_SYSTEM_DATA
-from test_file_system import TestFileSystem
-
-def ConstructorForTest(branch, revision=None):
- return TestFileSystem(CANNED_API_FILE_SYSTEM_DATA[str(branch)])
-
-class HostFileSystemCreatorTest(unittest.TestCase):
- def setUp(self):
- self._idle_path = 'api/idle.json'
-
- def testWithCaching(self):
- creator = HostFileSystemCreator(ObjectStoreCreator.ForTest(),
- constructor_for_test=ConstructorForTest)
-
- fs = creator.Create('trunk')
- firstRead = fs.ReadSingle(self._idle_path)
- CANNED_API_FILE_SYSTEM_DATA['trunk']['api']['idle.json'] = 'blah blah blah'
- secondRead = fs.ReadSingle(self._idle_path)
-
- self.assertEqual(firstRead, secondRead)
-
- def testWithOffline(self):
- creator = HostFileSystemCreator(ObjectStoreCreator.ForTest(),
- offline=True,
- constructor_for_test=ConstructorForTest)
-
- fs = creator.Create('trunk')
- # Offline file system should raise a FileNotFoundError if read is attempted.
- self.assertRaises(FileNotFoundError, fs.ReadSingle, self._idle_path)
-
-if __name__ == '__main__':
- unittest.main()

Powered by Google App Engine
This is Rietveld 408576698