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()) |