Files
ChatAIBot/tests/test_rp_sanitize.py
2026-06-04 08:05:06 +03:00

19 lines
705 B
Python

from services.rp_sanitize import strip_ooc_from_reply
def test_strip_ps_block():
text = (
"Луна зевает и прижимается к тебе.\n\n"
"Статус кво? Она никогда не признает слабость.\n\n"
"P.S. Когда вы выйдете из сауны, она будет бурчать."
)
out = strip_ooc_from_reply(text)
assert "P.S." not in out
assert "Статус кво" not in out
assert "Луна зевает" in out
def test_strip_keeps_in_character_body():
text = "— «Щенок…» — она бурчит, не открывая глаз."
assert strip_ooc_from_reply(text) == text