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

Method test_default_credentials_gcs_enabled

tests/test_gcs.py:41–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 1

init_gcsFunction · 0.90

Tested by

no test coverage detected