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

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

Issue 10825067: Extensions Docs Server: Apps samples page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: less is_apps and fixes Created 8 years, 4 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/integration_test.py
diff --git a/chrome/common/extensions/docs/server2/integration_test.py b/chrome/common/extensions/docs/server2/integration_test.py
index 392337d28dc610a1fa66d7b2c3dd8bf621a679ec..a72a96315f8db4682c67d071cb7e87f156e6df28 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,8 +11,12 @@ 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.
+ # This should be tested though: http://crbug.com/141910.
+ 'apps/samples.html',
]
class _MockResponse(object):
@@ -29,11 +34,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()
@@ -61,7 +69,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')
@@ -70,7 +78,7 @@ class IntegrationTest(unittest.TestCase):
self.assertEqual(200, response.status)
# Test that the pages were rendered by checking the size of the output.
# In python 2.6 there is no 'assertGreater' method.
- self.assertTrue(len(response.out.getvalue()) > 500000)
+ self.assertTrue(len(response.out.getvalue()) > 100000)
not at google - send to devlin 2012/08/13 01:51:11 Oh is it possible to put a failure message here? L
cduvall 2012/08/13 17:47:06 Done.
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698