MCPcopy Create free account
hub / github.com/mlco2/codecarbon / test_api_read_only

Method test_api_read_only

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

Source from the content-addressed store, hash-verified

47 self.assertEqual(api.access_token, "updated-token")
48
49 def test_api_read_only(self):
50 api = ApiClient(
51 endpoint_url="http://test.com",
52 api_key="Toto",
53 conf=None,
54 create_run_automatically=False,
55 )
56 self.assertIsNone(api.experiment_id)
57 self.assertEqual(api.api_key, "Toto")
58 self.assertEqual(api.url, "http://test.com")
59 self.assertIsNone(api.run_id)
60
61 def test_call_api(self):
62 with requests_mock.Mocker() as m:

Callers

nothing calls this directly

Calls 1

ApiClientClass · 0.90

Tested by

no test coverage detected