30 lines
895 B
Python
30 lines
895 B
Python
import youtube
|
|
import pytest
|
|
import wordfilter
|
|
|
|
def test_wordfilter():
|
|
wfilter = wordfilter.Wordfilter()
|
|
wfilter.add_words({'FAKESLUR'})
|
|
|
|
for good in [
|
|
'hi',
|
|
'Nothing in this was made using AI',
|
|
'Nothing in this was made using artificial intelligence',
|
|
'This music comes from Japan',
|
|
'Homogenized beats are sick',
|
|
'I love ornithomorphs',
|
|
'Join us on this audio journey'
|
|
]:
|
|
assert youtube.check_text(good, wfilter)
|
|
|
|
for bad in [
|
|
'This music was made using AI',
|
|
'This video was generated using artificial intelligence technology',
|
|
'This is a FAKESLUR video',
|
|
'This is jap music',
|
|
'shut up homo',
|
|
'We present to you soothing music born from "SunoAI"',
|
|
'Check out this shit I made with udio'
|
|
]:
|
|
assert not youtube.check_text(bad, wfilter)
|