http.request is a function, should be using http.credentials

This commit is contained in:
Jay Lee
2020-04-02 12:09:52 -04:00
parent 9ef7b2f80a
commit 0a0ca9ef03
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ def call(service,
if http_status == -1:
# The error detail indicated that we should retry this request
# We'll refresh credentials and make another pass
service._http.request.credentials.refresh(transport.create_http())
service._http.credentials.refresh(transport.create_http())
continue
if http_status == 0:
return None

View File

@@ -108,7 +108,7 @@ class GapiTest(unittest.TestCase):
self.mock_service, self.mock_method_name, soft_errors=True)
self.assertEqual(response, fake_200_response)
self.assertEqual(
self.mock_service._http.request.credentials.refresh.call_count, 1)
self.mock_service._http.credentials.refresh.call_count, 1)
self.assertEqual(self.mock_method.return_value.execute.call_count, 2)
def test_call_throws_for_provided_reason(self):