(self)
| 12 | class TestUcaip(unittest.TestCase): |
| 13 | |
| 14 | def test_user_provided_credentials(self): |
| 15 | credentials = _make_credentials() |
| 16 | env = EnvironmentVarGuard() |
| 17 | env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar') |
| 18 | env.set('KAGGLE_KERNEL_INTEGRATIONS', 'CLOUDAI') |
| 19 | with env: |
| 20 | from google.cloud import aiplatform |
| 21 | init_ucaip() |
| 22 | aiplatform.init(credentials=credentials) |
| 23 | self.assertNotIsInstance(aiplatform.initializer.global_config.credentials, KaggleKernelCredentials) |
| 24 | self.assertIsNotNone(aiplatform.initializer.global_config.credentials) |
nothing calls this directly
no test coverage detected