(self)
| 39 | self.assertIsNotNone(anonymous) |
| 40 | |
| 41 | def test_default_credentials_gcs_enabled(self): |
| 42 | env = EnvironmentVarGuard() |
| 43 | env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar') |
| 44 | env.set('KAGGLE_KERNEL_INTEGRATIONS', 'GCS') |
| 45 | with env: |
| 46 | init_gcs() |
| 47 | client = storage.Client(project="xyz") |
| 48 | self.assertIsInstance(client._credentials, KaggleKernelCredentials) |
| 49 | self.assertTrue(client._connection.user_agent.startswith("kaggle-gcp-client/1.0")) |
| 50 | |
| 51 | def test_monkeypatching_idempotent(self): |
| 52 | env = EnvironmentVarGuard() |
nothing calls this directly
no test coverage detected