Skip to content

Commit

Permalink
test/test_findspam.py: add test for body_text_repeated()
Browse files Browse the repository at this point in the history
  • Loading branch information
tripleee committed May 18, 2022
1 parent a0713e6 commit 57fc55c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_findspam.py
Expand Up @@ -136,6 +136,7 @@
('homoglyph phone numbers 07', '<p>Some 1-844i8O2i7S3S fbody</p>', 'a username', 'math.stackexchange.com', False, False, True),
('homoglyph phone numbers 08', '<p>Some 844-8O2-7S3S foobody</p>', 'a username', 'math.stackexchange.com', False, False, True),
('Multiple consecutive homoglyph numbers 1', '<p>SomeI-888-884-Olll 888-884-OIII +I-972-S34-S446 972-S34-S446 I-628-21S-2I66 628-21S-2l66 1-844i8O2i7S3S 844a8O2a7S3S body</p>', 'a username', 'math.stackexchange.com', False, False, True),
('repeated body test', 'need enough interesting text to avoid few unique characters rule' * 15, 'luser', 'stackoverflow.com', False, False, True),
])
def test_findspam(title, body, username, site, body_is_summary, is_answer, expected_spam):
post = Post(api_response={'title': title, 'body': body,
Expand Down

0 comments on commit 57fc55c

Please sign in to comment.