Skip to content

Commit

Permalink
is_appengine=False in testbed (like it used to)
Browse files Browse the repository at this point in the history
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 urllib3#1704.  This commit
undoes that regression for testbed tests.
  • Loading branch information
zevdg committed Nov 25, 2019
1 parent f5e3434 commit 17c92a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/urllib3/contrib/_appengine_environ.py
Expand Up @@ -6,7 +6,7 @@


def is_appengine():
return "APPENGINE_RUNTIME" in os.environ
return is_local_appengine() or is_prod_appengine()


def is_appengine_sandbox():
Expand All @@ -20,15 +20,15 @@ def is_appengine_sandbox():


def is_local_appengine():
return is_appengine() and os.environ.get("SERVER_SOFTWARE", "").startswith(
"Development/"
)
return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
"SERVER_SOFTWARE", ""
).startswith("Development/")


def is_prod_appengine():
return is_appengine() and os.environ.get("SERVER_SOFTWARE", "").startswith(
"Google App Engine/"
)
return "APPENGINE_RUNTIME" in os.environ and os.environ.get(
"SERVER_SOFTWARE", ""
).startswith("Google App Engine/")


def is_prod_appengine_mvms():
Expand Down

0 comments on commit 17c92a7

Please sign in to comment.