MCPcopy Create free account
hub / github.com/RightNow-AI/rightnow-cli / test_save_config

Method test_save_config

tests/test_cache.py:126–138  ·  view source on GitHub ↗

Test saving configuration.

(self, cache_manager)

Source from the content-addressed store, hash-verified

124 assert config == config_data
125
126 def test_save_config(self, cache_manager):
127 """Test saving configuration."""
128 config_data = {"openrouter_api_key": "new-key", "setting": "value"}
129 cache_manager.save_config(config_data)
130
131 # Verify file was written
132 config_path = cache_manager.get_config_path()
133 assert config_path.exists()
134
135 # Verify content
136 with open(config_path, 'r') as f:
137 saved_config = json.load(f)
138 assert saved_config == config_data
139
140 def test_has_api_key_false(self, cache_manager):
141 """Test has_api_key when no key is configured."""

Callers

nothing calls this directly

Calls 4

save_configMethod · 0.80
get_config_pathMethod · 0.80
existsMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected