Skip to content

Commit e163bc9

Browse files
author
Jon Wayne Parrott
committed
Fix template string in App Engine system tests.
1 parent 7a27f47 commit e163bc9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

system_tests/app_engine/app/main.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@
3333
import urllib3.contrib.appengine
3434
import webapp2
3535

36+
FAILED_TEST_TMPL = """
37+
Test {} failed: {}
38+
39+
Stacktrace:
40+
{}
41+
42+
Captured output:
43+
{}
44+
"""
3645
TOKEN_INFO_URL = 'https://www.googleapis.com/oauth2/v3/tokeninfo'
3746
EMAIL_SCOPE = 'https://www.googleapis.com/auth/userinfo.email'
3847
HTTP = urllib3.contrib.appengine.AppEngineManager()
@@ -83,12 +92,9 @@ def run_test_func(func):
8392
func()
8493
return True, ''
8594
except Exception as exc:
86-
output = (
87-
'Test {} failed: {}\n\n'
88-
'Stacktrace:\n{}\n\n'
89-
'Captured output:\n{}').format(
90-
func.func_name, exc, traceback.format_exc(),
91-
capsys.getvalue())
95+
output = FAILED_TEST_TMPL.format(
96+
func.func_name, exc, traceback.format_exc(),
97+
capsys.getvalue())
9298
return False, output
9399

94100

0 commit comments

Comments
 (0)