Merge pull request #1273 from soltanmm/auth-interop
Fix Python auth and interop test
diff --git a/src/python/interop/interop/client.py b/src/python/interop/interop/client.py
index bae5e17..41f0d94 100644
--- a/src/python/interop/interop/client.py
+++ b/src/python/interop/interop/client.py
@@ -64,7 +64,7 @@
return parser.parse_args()
def _oauth_access_token(args):
- credentials = client.GoogleCredentials.get_application_default()
+ credentials = oauth2client_client.GoogleCredentials.get_application_default()
scoped_credentials = credentials.create_scoped([args.oauth_scope])
return scoped_credentials.get_access_token().access_token
diff --git a/src/python/interop/interop/methods.py b/src/python/interop/interop/methods.py
index c69771d..909b738 100644
--- a/src/python/interop/interop/methods.py
+++ b/src/python/interop/interop/methods.py
@@ -292,7 +292,7 @@
if wanted_email != response.username:
raise ValueError(
'expected username %s, got %s' % (wanted_email, response.username))
- if response.oauth_scope in args.oauth_scope:
+ if args.oauth_scope.find(response.oauth_scope) == -1:
raise ValueError(
'expected to find oauth scope "%s" in received "%s"' %
(response.oauth_scope, args.oauth_scope))
diff --git a/src/python/src/grpc/early_adopter/implementations.py b/src/python/src/grpc/early_adopter/implementations.py
index 35456d3..f3f2a04 100644
--- a/src/python/src/grpc/early_adopter/implementations.py
+++ b/src/python/src/grpc/early_adopter/implementations.py
@@ -223,7 +223,8 @@
breakdown = _face_utilities.break_down_invocation(service_name, methods)
return _Stub(
breakdown, host, port, secure, root_certificates, private_key,
- certificate_chain, server_host_override=server_host_override)
+ certificate_chain, server_host_override=server_host_override,
+ metadata_transformer=metadata_transformer)
def server(