(self)
| 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() |
nothing calls this directly
no test coverage detected