Index: chrome/common/extensions/docs/server2/integration_test.py |
diff --git a/chrome/common/extensions/docs/server2/integration_test.py b/chrome/common/extensions/docs/server2/integration_test.py |
index 6f0244c39e983bdd40b828b519def5242ccbce4c..6c0f157eb5bd257ae4c846de245c9fa059a48132 100755 |
--- a/chrome/common/extensions/docs/server2/integration_test.py |
+++ b/chrome/common/extensions/docs/server2/integration_test.py |
@@ -3,6 +3,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import logging |
import os |
from StringIO import StringIO |
import unittest |
@@ -10,10 +11,13 @@ import unittest |
import appengine_memcache as memcache |
import handler |
from handler import Handler |
+import url_constants |
KNOWN_FAILURES = [ |
+ # Apps samples fails because it requires fetching data from github.com. |
+ 'apps/samples.html', |
# Exception in schema compiler (model.py). See http://crbug.com/141279. |
- 'app.html', |
+ 'apps/app.html' |
] |
class _MockResponse(object): |
@@ -31,11 +35,14 @@ class _MockRequest(object): |
class IntegrationTest(unittest.TestCase): |
def testAll(self): |
+ logging.getLogger().setLevel(logging.ERROR) |
base_path = os.path.join('templates', 'public') |
for path, dirs, files in os.walk(base_path): |
for name in files: |
filename = os.path.join(path, name) |
- if name in KNOWN_FAILURES or '.' in path or name.startswith('.'): |
+ if (filename.split('/', 2)[-1] in KNOWN_FAILURES or |
+ '.' in path or |
+ name.startswith('.')): |
continue |
request = _MockRequest(filename.split('/', 2)[-1]) |
response = _MockResponse() |
@@ -63,7 +70,7 @@ class IntegrationTest(unittest.TestCase): |
def testWarmupRequest(self): |
for branch in ['dev', 'trunk', 'beta', 'stable']: |
handler.BRANCH_UTILITY_MEMCACHE.Set( |
- branch + '.' + handler.OMAHA_PROXY_URL, |
+ branch + '.' + url_constants.OMAHA_PROXY_URL, |
'local', |
memcache.MEMCACHE_BRANCH_UTILITY) |
request = _MockRequest('_ah/warmup') |