1
0
python-google-auth/oauth-no-appengine.patch
2018-05-08 10:27:28 +00:00

44 lines
1.5 KiB
Diff

Index: google-auth-1.4.1/tests/test__oauth2client.py
===================================================================
--- google-auth-1.4.1.orig/tests/test__oauth2client.py
+++ google-auth-1.4.1/tests/test__oauth2client.py
@@ -93,25 +93,6 @@ def mock_oauth2client_gae_imports(mock_n
mock_non_existent_module('webapp2')
-@mock.patch('google.auth.app_engine.app_identity')
-def test__convert_appengine_app_assertion_credentials(
- app_identity, mock_oauth2client_gae_imports):
-
- import oauth2client.contrib.appengine
-
- service_account_id = 'service_account_id'
- old_credentials = oauth2client.contrib.appengine.AppAssertionCredentials(
- scope='one two', service_account_id=service_account_id)
-
- new_credentials = (
- _oauth2client._convert_appengine_app_assertion_credentials(
- old_credentials))
-
- assert new_credentials.scopes == ['one', 'two']
- assert (new_credentials._service_account_id ==
- old_credentials.service_account_id)
-
-
class FakeCredentials(object):
pass
@@ -143,12 +124,6 @@ def reset__oauth2client_module():
reload_module(_oauth2client)
-def test_import_has_app_engine(
- mock_oauth2client_gae_imports, reset__oauth2client_module):
- reload_module(_oauth2client)
- assert _oauth2client._HAS_APPENGINE
-
-
def test_import_without_oauth2client(monkeypatch, reset__oauth2client_module):
monkeypatch.setitem(sys.modules, 'oauth2client', None)
with pytest.raises(ImportError) as excinfo: