Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Replace nonresolving domain names in URLs in test cases to speed up tests #13813

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/test_findspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
('18669786819 gmail customer service number 1866978-6819 gmail support number', '', '', '', True, False, True),
('Is there any http://www.hindawi.com/ template for Cloud-Oriented Data Center Networking?', '', '', '', False, False, True),
('', '', 'bagprada', '', False, False, True),
('12 Month Loans quick @ http://www.quick12monthpaydayloans.co.uk/Elimination of collateral pledging', '', '', '', False, False, True),
('12 Month Loans quick @ http://www.quick12monthpaydayloans.example.co.uk/Elimination of collateral pledging', '', '', '', False, False, True),
('support for yahoo mail 18669786819 @call for helpline number', '', '', '', False, False, True),
('yahoo email tech support 1 866 978 6819 Yahoo Customer Phone Number ,Shortest Wait', '', '', '', False, False, True),
('kkkkkkkkkkkkkkkkkkkkkkkkkkkk', '<p>bbbbbbbbbbbbbbbbbbbbbb</p>', '', 'stackoverflow.com', False, False, True),
Expand All @@ -37,7 +37,7 @@
('hotmail customer <*<*<*[*[ 1 - 844-780-6762 *** support toll free number Hotmail Phone Number hotmail account recovery phone number', '', '', 'stackoverflow.com', False, False, True),
('1 - 844-780-6762 outlook phone number-outlook telephone number-outlook customer care helpline number', '', '', 'stackoverflow.com', False, False, True),
('Repeating word word word word word word word word word', '', '', 'stackoverflow.com', False, False, True),
('Visit this website: optimalstackfacts.net', '', '', 'stackoverflow.com', False, False, True),
('Visit this website: optimalstackfacts.example.net', '', '', 'stackoverflow.com', False, False, True),
('his email address is ([email protected])', '', '', 'money.stackexchange.com', False, False, True),
('something', 'his email address is ([email protected])', '', 'money.stackexchange.com', False, False, True),
('asdf asdf asdf asdf asdf asdf asdf asdf', '', '', 'stackoverflow.com', True, False, True),
Expand Down Expand Up @@ -77,7 +77,7 @@
('Title here', '<img src="http://example.com/11111111111111.jpg" alt="my image" />', '', 'stackoverflow.com', False, False, True),
('Title here', '<a href="http://example.com/11111111111111.html">page</a>', '', 'stackoverflow.com', False, False, False),
('Error: 2147467259', '', '', 'stackoverflow.com', False, False, False),
('Max limit on number of concurrent ajax request', """<p>Php java script boring yaaarrr <a href="http://www.price-buy.com/" rel="nofollow noreferrer">Price-Buy.com</a> </p>""", 'Price Buy', 'stackoverflow.com', True, True, True),
('Max limit on number of concurrent ajax request', """<p>Php java script boring yaaarrr <a href="http://www.price-buy.example.com/" rel="nofollow noreferrer">Price-Buy.example.com</a> </p>""", 'Price Buy', 'stackoverflow.com', True, True, True),
('Proof of onward travel in Japan?', """<p>The best solution to overcome the problem of your travel<a href="https://i.stack.imgur.com/eS6WQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eS6WQ.jpg" alt="enter image description here"></a></p>

<p>httl://bestonwardticket.com</p>""", 'Best onward Ticket', 'travel.stackexchange.com', True, True, True),
Expand All @@ -99,7 +99,7 @@
('Body starts with title', 'Body starts with title and ends with <a href="https://example.com">https://example.com</a>', '', '', False, False, True),
('Body starts with title', 'Body starts with title and ends with <a href="https://example.com">https://example.com</a>', '', '', False, True, False),
('Advanced BSWT', '<p><a href="......">Product Name</a> Advanced BSWT is a must-have <a href="https://example.com">https://example.com</a></p>', '', '', False, False, True),
('IDNA misleading link', '<a href="http://www.h%c3%a5nd.no">http://www.h\u00E5nd.no</a>', '', '', False, False, False),
('IDNA misleading link', '<a href="http://h%c3%a5nd.example.no">http://h\u00E5nd.example.no</a>', '', '', False, False, False),
('Mostly punctuation', ';[].[.[.&_$)_\\*&_@$.[;*/-!#*&)(_.\'].1\\)!#_', '', '', False, False, True),
('Few unique', 'asdss, dadasssaadadda, daaaadadsss, ssa,,,addadas,ss\nsdadadsssadadas, sss\ndaaasdddsaaa, asd', '', '', False, False, True),
('ketones on Chemistry', 'ketones', 'ketones', 'chemistry.stackexchange.com', False, False, False),
Expand Down
2 changes: 1 addition & 1 deletion test/test_spamhandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_handle_spam_offensive_title(cls):
('18669786819 gmail customer service number 1866978-6819 gmail support number', '', '', '', True),
('Is there any http://www.hindawi.com/ template for Cloud-Oriented Data Center Networking?', '', '', '', True),
('', '', 'bagprada', '', True),
('12 Month Loans quick @ https://www.quick12monthpaydayloans.co.uk/Elimination of collateral pledging', '', '', '', True),
('12 Month Loans quick @ https://www.quick12monthpaydayloans.example.co.uk/Elimination of collateral pledging', '', '', '', True),
('support for yahoo mail 18669786819 @call for helpline number', '', '', '', True),
('yahoo email tech support 1 866 978 6819 Yahoo Customer Phone Number ,Shortest Wait', '', '', '', True),
('Not a phone number 192.168.0.1', 'Not a phone number 192.168.0.1', '', '', False),
Expand Down