(self)
| 49 | self.assertTrue(client._connection.user_agent.startswith("kaggle-gcp-client/1.0")) |
| 50 | |
| 51 | def test_monkeypatching_idempotent(self): |
| 52 | env = EnvironmentVarGuard() |
| 53 | env.set('KAGGLE_USER_SECRETS_TOKEN', 'foobar') |
| 54 | env.set('KAGGLE_KERNEL_INTEGRATIONS', 'GCS') |
| 55 | with env: |
| 56 | client1 = storage.Client.__init__ |
| 57 | init_gcs() |
| 58 | client2 = storage.Client.__init__ |
| 59 | self.assertEqual(client1, client2) |
nothing calls this directly
no test coverage detected