MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / test_validate

Method test_validate

tests/test_hook_config.py:259–274  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

257
258 @pytest.mark.asyncio
259 async def test_validate(self):
260 registry = AsyncHookRegistry()
261 with tempfile.NamedTemporaryFile(mode="w", suffix=".json", delete=False) as f:
262 json.dump({
263 "hooks": {
264 "PreToolUse": [
265 {"type": "command"}
266 ]
267 }
268 }, f)
269 f.flush()
270 manager = HookConfigManager(registry, f.name)
271 errors = await manager.validate()
272
273 os.unlink(f.name)
274 assert len(errors) == 1
275
276 @pytest.mark.asyncio
277 async def test_validate_missing_file(self):

Callers

nothing calls this directly

Calls 4

validateMethod · 0.95
AsyncHookRegistryClass · 0.90
HookConfigManagerClass · 0.90
flushMethod · 0.45

Tested by

no test coverage detected