(self)
| 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): |
nothing calls this directly
no test coverage detected