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

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

Issue 10834144: Extensions Docs Server: Split apps from extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up 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 57a1a3a12d7ec538e1ca64dedddea721151c33c3..a2c1c9aaafd05cc15befd776a428263c34a15775 100755
--- a/chrome/common/extensions/docs/server2/integration_test.py
+++ b/chrome/common/extensions/docs/server2/integration_test.py
@@ -30,14 +30,17 @@ class _MockRequest(object):
class IntegrationTest(unittest.TestCase):
def testAll(self):
- for filename in os.listdir(os.path.join('templates', 'public')):
- if filename in KNOWN_FAILURES or filename.startswith('.'):
- continue
- request = _MockRequest(filename)
- response = _MockResponse()
- Handler(request, response, local_path='../..').get()
- self.assertEqual(200, response.status)
- self.assertTrue(response.out.getvalue())
+ 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 filename in KNOWN_FAILURES or filename.startswith('.'):
+ continue
+ request = _MockRequest(filename.split('/', 2)[-1])
+ response = _MockResponse()
+ Handler(request, response, local_path='../..').get()
+ self.assertEqual(200, response.status)
+ self.assertTrue(response.out.getvalue())
def test404(self):
request = _MockRequest('junk.html')
@@ -49,7 +52,7 @@ class IntegrationTest(unittest.TestCase):
def testLocales(self):
# Use US English, Spanish, and Arabic.
for lang in ['en-US', 'es', 'ar']:
- request = _MockRequest('samples.html')
+ request = _MockRequest('extensions/samples.html')
request.headers['Accept-Language'] = lang + ';q=0.8'
response = _MockResponse()
Handler(request, response, local_path='../..').get()
« no previous file with comments | « chrome/common/extensions/docs/server2/handler.py ('k') | chrome/common/extensions/docs/server2/template_data_source.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698