From 44f2f59c6169c0cdf0c5d2b5bfe0701f87c2dfb2 Mon Sep 17 00:00:00 2001 From: Zev Goldstein Date: Mon, 25 Nov 2019 16:59:25 -0500 Subject: [PATCH] is_appengine=False in testbed (like it used to) Whether testbed tests "are appengine" is debatable, but historically this function has returned False in testbed tests. This behavior was inadvertently (and unnecessarily) changed in PR #1704. This commit undoes that regression for testbed tests. --- src/urllib3/contrib/_appengine_environ.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/urllib3/contrib/_appengine_environ.py b/src/urllib3/contrib/_appengine_environ.py index 119efaeeb6..38e227b2e9 100644 --- a/src/urllib3/contrib/_appengine_environ.py +++ b/src/urllib3/contrib/_appengine_environ.py @@ -6,7 +6,9 @@ def is_appengine(): - return "APPENGINE_RUNTIME" in os.environ + return "APPENGINE_RUNTIME" in os.environ and not os.environ.get( + "SERVER_SOFTWARE", "" + ).startswith("testutil/") def is_appengine_sandbox():