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

Method test_discover_endpoints

tests/cli/test_cli_auth.py:66–74  ·  view source on GitHub ↗
(self, mock_get)

Source from the content-addressed store, hash-verified

64class TestAuthMethods(unittest.TestCase):
65 @patch("codecarbon.cli.auth.requests.get")
66 def test_discover_endpoints(self, mock_get):
67 mock_get.return_value.json.return_value = {
68 "token_endpoint": "url",
69 "jwks_uri": "jwks",
70 }
71 mock_get.return_value.raise_for_status.return_value = None
72 result = auth._discover_endpoints()
73 self.assertIn("token_endpoint", result)
74 self.assertIn("jwks_uri", result)
75
76 @patch("builtins.open")
77 def test_save_and_load_credentials(self, mock_open):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected