Fixed SD RPG
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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
|
||||
Reference in New Issue
Block a user