Add more rel_has_nofollow tests

This commit is contained in:
Michel Ace 2021-08-10 22:21:51 +02:00 committed by GitHub
parent 295f0e2bf5
commit ce9d6c658b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -166,6 +166,10 @@ class UtilsMiscTestCase(unittest.TestCase):
assert rel_has_nofollow('ugc nofollow') is True
assert rel_has_nofollow('ugc,nofollow') is True
assert rel_has_nofollow('ugc') is False
assert rel_has_nofollow('nofollow') is True
assert rel_has_nofollow('nofollowfoo') is False
assert rel_has_nofollow('foonofollow') is False
assert rel_has_nofollow('ugc, , nofollow') is True
if __name__ == "__main__":