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

Method test_monkeypatching_succeed

tests/test_vision.py:48–55  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 self.assertIsNotNone(client.credentials)
47
48 def test_monkeypatching_succeed(self):
49 env = EnvironmentVarGuard()
50 env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar')
51 env.set('KAGGLE_KERNEL_INTEGRATIONS', 'CLOUDAI')
52 with env:
53 init_vision()
54 client = vision.ImageAnnotatorClient.__init__
55 self.assertTrue("kaggle_gcp" in inspect.getsourcefile(client))
56
57 def test_monkeypatching_idempotent(self):
58 env = EnvironmentVarGuard()

Callers

nothing calls this directly

Calls 1

init_visionFunction · 0.90

Tested by

no test coverage detected