Test loading API keys from file.
()
| 10 | |
| 11 | |
| 12 | def test_load_api_keys(): |
| 13 | """Test loading API keys from file.""" |
| 14 | mock_content = "key1\nkey2\n\nkey3" |
| 15 | with patch("builtins.open", mock_open(read_data=mock_content)): |
| 16 | with patch("os.path.exists", return_value=True): |
| 17 | load_api_keys() |
| 18 | assert "key1" in API_KEYS |
| 19 | assert "key2" in API_KEYS |
| 20 | assert "key3" in API_KEYS |
| 21 | assert len(API_KEYS) == 3 |
| 22 | |
| 23 | |
| 24 | def test_initialize_keys_creates_file(): |
nothing calls this directly
no test coverage detected