MCPcopy Create free account
hub / github.com/Kaggle/docker-python / test_ctr

Method test_ctr

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

Source from the content-addressed store, hash-verified

18 self.assertIsNotNone(storage.__version__)
19
20 def test_ctr(self):
21 credentials = _make_credentials()
22 env = EnvironmentVarGuard()
23 env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar')
24 env.set('KAGGLE_KERNEL_INTEGRATIONS', 'GCS')
25 with env:
26 init_gcs()
27 client = storage.Client(project="xyz", credentials=credentials)
28 self.assertEqual(client.project, "xyz")
29 self.assertNotIsInstance(client._credentials, KaggleKernelCredentials)
30 self.assertIsNotNone(client._credentials)
31
32 def test_annonymous_client(self):
33 env = EnvironmentVarGuard()

Callers

nothing calls this directly

Calls 2

init_gcsFunction · 0.90
_make_credentialsFunction · 0.70

Tested by

no test coverage detected