MCPcopy Index your code
hub / github.com/Kaggle/docker-python / test_default_credentials

Method test_default_credentials

tests/test_vision.py:26–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24
25 @patch("google.cloud.vision.ImageAnnotatorClient", new=FakeClient)
26 def test_default_credentials(self):
27 env = EnvironmentVarGuard()
28 env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar')
29 env.set('KAGGLE_KERNEL_INTEGRATIONS', 'CLOUDAI')
30 with env:
31 init_vision()
32 client = vision.ImageAnnotatorClient()
33 self.assertIsNotNone(client.credentials)
34 self.assertIsInstance(client.credentials, KaggleKernelCredentials)
35
36 @patch("google.cloud.vision.ImageAnnotatorClient", new=FakeClient)
37 def test_user_provided_credentials(self):

Callers

nothing calls this directly

Calls 1

init_visionFunction · 0.90

Tested by

no test coverage detected