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

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

Issue 214843006: Docserver: Support //apps APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no copy, API->EXTENSIONS_API Created 6 years, 9 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
« no previous file with comments | « chrome/common/extensions/docs/server2/api_models.py ('k') | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/api_models_test.py
diff --git a/chrome/common/extensions/docs/server2/api_models_test.py b/chrome/common/extensions/docs/server2/api_models_test.py
index 1d2a4c140d14051c1365bda05aa1cd0bd2df8c94..305f4e7a775bd73e7e35772bc5add1f0b7c660b6 100755
--- a/chrome/common/extensions/docs/server2/api_models_test.py
+++ b/chrome/common/extensions/docs/server2/api_models_test.py
@@ -8,7 +8,7 @@ import unittest
from api_models import APIModels
from compiled_file_system import CompiledFileSystem
-from extensions_paths import CHROME_API, CHROME_EXTENSIONS
+from extensions_paths import API_PATHS, CHROME_API, CHROME_EXTENSIONS
from features_bundle import FeaturesBundle
from file_system import FileNotFoundError
from mock_file_system import MockFileSystem
@@ -128,11 +128,11 @@ class APIModelsTest(unittest.TestCase):
'storage.idl').Get)
def testSingleFile(self):
- # 4 stats (1 for JSON and 1 for IDL, in both possible API path),
+ # 2 stats (1 for JSON and 1 for IDL) for each available API path.
# 1 read (for IDL file which existed).
future = self._api_models.GetModel('alarms')
self.assertTrue(*self._mock_file_system.CheckAndReset(
- read_count=1, stat_count=4))
+ read_count=1, stat_count=len(API_PATHS)*2))
# 1 read-resolve (for the IDL file).
#
@@ -143,10 +143,11 @@ class APIModelsTest(unittest.TestCase):
self.assertTrue(*self._mock_file_system.CheckAndReset(
read_resolve_count=1))
- # 4 stats (1 for JSON and 1 for IDL, in both possible API paths)
- # no reads (still cached).
+ # 2 stats (1 for JSON and 1 for IDL) for each available API path.
+ # No reads (still cached).
future = self._api_models.GetModel('alarms')
- self.assertTrue(*self._mock_file_system.CheckAndReset(stat_count=4))
+ self.assertTrue(*self._mock_file_system.CheckAndReset(
+ stat_count=len(API_PATHS)*2))
future.Get()
self.assertTrue(*self._mock_file_system.CheckAndReset())
« no previous file with comments | « chrome/common/extensions/docs/server2/api_models.py ('k') | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698