MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_codebuddy_uninstall_removes_hook

Function test_codebuddy_uninstall_removes_hook

tests/test_codebuddy.py:193–202  ·  view source on GitHub ↗

Uninstall removes the PreToolUse hook from .codebuddy/settings.json.

(tmp_path)

Source from the content-addressed store, hash-verified

191
192
193def test_codebuddy_uninstall_removes_hook(tmp_path):
194 """Uninstall removes the PreToolUse hook from .codebuddy/settings.json."""
195 from graphify.__main__ import codebuddy_install, codebuddy_uninstall
196 codebuddy_install(tmp_path)
197 codebuddy_uninstall(tmp_path)
198 settings_path = _settings_path(tmp_path)
199 if settings_path.exists():
200 settings = json.loads(settings_path.read_text())
201 hooks = settings.get("hooks", {}).get("PreToolUse", [])
202 assert not any("graphify" in str(h) for h in hooks)
203
204
205def test_codebuddy_uninstall_noop_if_not_installed(tmp_path):

Callers

nothing calls this directly

Calls 4

codebuddy_installFunction · 0.85
codebuddy_uninstallFunction · 0.85
_settings_pathFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected