(self, mock_get)
| 64 | class 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): |
nothing calls this directly
no outgoing calls
no test coverage detected