def test_bad_regex(self):
        ku_tag = Tag.objects.create(name='ku')
        TagKeyword.objects.create(
            tag=ku_tag,
            keyword='kansas university'
        )
        new_regex = TagRegex(
            tag=ku_tag,
            name='Find University of Kansas',
            regex='University\s+of(\s+Kansas'
        )
        self.assertRaises(ValidationError, new_regex.save)

        suggested_tags = suggest_tags('I was once a student at the University '
            'of Kansas. Also known as kansas university by the way.')

        self.assertTrue(ku_tag in suggested_tags)
dataset/ETHPy150Open frankwiles/django-taggit-suggest/taggit_suggest/tests.py/SuggestCase.test_bad_regex/original