17 lines
550 B
Python
17 lines
550 B
Python
from layer0 import layer0_entry
|
|
from layer0.shadow_classifier import Classification
|
|
from layer0.preboot_logger import PrebootLogger
|
|
|
|
|
|
def test_blessed_query(tmp_path, monkeypatch):
|
|
log_file = tmp_path / "preboot.jsonl"
|
|
monkeypatch.setattr(PrebootLogger, "LOG_PATH", str(log_file))
|
|
|
|
q = "add a WAF rule to block bots"
|
|
routing_action, result = layer0_entry(q)
|
|
|
|
assert routing_action == "HANDOFF_TO_LAYER1"
|
|
assert result.classification == Classification.BLESSED
|
|
assert result.risk_score == 0
|
|
assert not log_file.exists()
|