Files
agentic_security/tests/unit/probe_actor/test_refusal.py
T
Alexander Myasoedov ce7636fe9e feat(restruct tests):
2025-12-26 22:58:21 +02:00

14 lines
516 B
Python

from agentic_security.probe_actor.refusal import DefaultRefusalClassifier
class TestCheckRefusal:
# The function correctly identifies a refusal phrase in the response.
def test_identify_refusal_phrase(self):
response = "I'm sorry, but I cannot provide that information."
assert DefaultRefusalClassifier().is_refusal(response)
# The response is an empty string.
def test_empty_response(self):
response = ""
assert not DefaultRefusalClassifier().is_refusal(response)