wiqaya/tests/test_filter.py
2026-03-08 09:50:41 +02:00

11 lines
No EOL
303 B
Python

from wiqaya import Wiqaya
def test_is_profane():
w = Wiqaya(lang="ar")
assert w.is_profane("نص عادي") == False
def test_censor():
w = Wiqaya(lang="ar")
text = "نص سيء حرامي"
print(w.censor(text, char="*") )
assert w.censor(text, char="*") == "نص سيء *****"