예제 #1
0
    def run(self, word):
        if word is None:
            raise ValueError('word is None:  python manage.py check  --word="あいう"')

        # insert
        InspectionWord.register(INSPECTION_WORD)

        # ck
        if InspectionWord.inspection(word):
            print('True NGワードに該当')
            return
        if inspection_affiliate(word):
            print('True アフィチェックに該当')
            return
        print('False 該当せず')
예제 #2
0
    def run(self, word):
        if word is None:
            raise ValueError(
                'word is None:  python manage.py check  --word="あいう"')

        # insert
        InspectionWord.register(INSPECTION_WORD)

        # ck
        if InspectionWord.inspection(word):
            print('True NGワードに該当')
            return
        if inspection_affiliate(word):
            print('True アフィチェックに該当')
            return
        print('False 該当せず')
예제 #3
0
def tests_afi():
    word = 'あんぱん'
    assert inspection_affiliate(word) == False

    word = 'あふぃ'
    assert inspection_affiliate(word)

    word = 'アフィ'
    assert inspection_affiliate(word)

    word = 'アマルフィ'
    assert inspection_affiliate(word)

    word = 'アまるふぃ'
    assert inspection_affiliate(word)

    word = 'あかん、ゴムゴムのるふぃ'
    assert inspection_affiliate(word)

    word = 'あかん、ゴムゴムのルフィ'
    assert inspection_affiliate(word)

    word = 'あかん、ゴムゴムのルフーーィ'
    assert inspection_affiliate(word)

    word = 'クリック'
    assert inspection_affiliate(word)

    word = 'くりっく'
    assert inspection_affiliate(word)

    word = '広告'
    assert inspection_affiliate(word)