diff --git a/googleapiclient/discovery_cache/__init__.py b/googleapiclient/discovery_cache/__init__.py index 36e5879a2e1..6051191e737 100644 --- a/googleapiclient/discovery_cache/__init__.py +++ b/googleapiclient/discovery_cache/__init__.py @@ -34,7 +34,7 @@ def autodetect(): googleapiclient.discovery_cache.base.Cache, a cache object which is auto detected, or None if no cache object is available. """ - if "APPENGINE_RUNTIME" in os.environ: + if "GAE_ENV" in os.environ: try: from . import appengine_memcache diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 8f4bdec1f03..229be6fdb3d 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -1205,7 +1205,7 @@ def test_single_500_then_404_retries_and_succeeds(self): class DiscoveryFromAppEngineCache(unittest.TestCase): def setUp(self): self.old_environ = os.environ.copy() - os.environ["APPENGINE_RUNTIME"] = "python27" + os.environ["GAE_ENV"] = "standard" def tearDown(self): os.environ = self.old_environ