Lines Matching refs:http
7 # http://www.apache.org/licenses/LICENSE-2.0
37 http = mock.MagicMock()
38 http.request = mock.MagicMock(
42 c = AppAssertionCredentials(scope=['http://example.com/a',
43 'http://example.com/b'])
45 c.refresh(http)
48 http.request.assert_called_once_with(
49 'http://metadata.google.internal/0.1/meta-data/service-accounts/'
51 '?scope=http%3A%2F%2Fexample.com%2Fa%20http%3A%2F%2Fexample.com%2Fb')
54 http = mock.MagicMock()
55 http.request = mock.MagicMock(return_value=(mock.Mock(status=400), '{}'))
57 c = AppAssertionCredentials(scope=['http://example.com/a',
58 'http://example.com/b'])
59 self.assertRaises(AccessTokenRefreshError, c.refresh, http)
62 c = AppAssertionCredentials(scope=['http://example.com/a',
63 'http://example.com/b'])
85 http = mock.MagicMock()
86 http.request = mock.MagicMock(
91 token = credentials.get_access_token(http=http)
95 http.request.assert_called_once_with(
96 'http://metadata.google.internal/0.1/meta-data/service-accounts/'