mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-06-24 06:09:55 +02:00
15 lines
449 B
Python
15 lines
449 B
Python
from langalf.probe_actor.refusal import check_refusal
|
|
|
|
|
|
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 check_refusal(response)
|
|
|
|
# The response is an empty string.
|
|
def test_empty_response(self):
|
|
response = ""
|
|
assert not check_refusal(response)
|