Merge pull request #156 from TheYahya/hoadlck-tests-coverage
Add More Tests For Sites
This commit is contained in:
@@ -19,15 +19,13 @@
|
|||||||
"urlMain": "https://about.me/"
|
"urlMain": "https://about.me/"
|
||||||
},
|
},
|
||||||
"Academia.edu": {
|
"Academia.edu": {
|
||||||
"errorMsg": "Page Not Found",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 385,
|
"rank": 385,
|
||||||
"url": "https://independent.academia.edu/{}",
|
"url": "https://independent.academia.edu/{}",
|
||||||
"urlMain": "https://www.academia.edu/"
|
"urlMain": "https://www.academia.edu/"
|
||||||
},
|
},
|
||||||
"AngelList": {
|
"AngelList": {
|
||||||
"errorMsg": "We couldn't find what you were looking for.",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 3469,
|
"rank": 3469,
|
||||||
"url": "https://angel.co/{}",
|
"url": "https://angel.co/{}",
|
||||||
"urlMain": "https://angel.co/"
|
"urlMain": "https://angel.co/"
|
||||||
@@ -45,8 +43,7 @@
|
|||||||
"urlMain": "https://ask.fm/"
|
"urlMain": "https://ask.fm/"
|
||||||
},
|
},
|
||||||
"BLIP.fm": {
|
"BLIP.fm": {
|
||||||
"errorMsg": "Page Not Found",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 261919,
|
"rank": 261919,
|
||||||
"url": "https://blip.fm/{}",
|
"url": "https://blip.fm/{}",
|
||||||
"urlMain": "https://blip.fm/"
|
"urlMain": "https://blip.fm/"
|
||||||
@@ -58,8 +55,7 @@
|
|||||||
"urlMain": "https://badoo.com/"
|
"urlMain": "https://badoo.com/"
|
||||||
},
|
},
|
||||||
"Bandcamp": {
|
"Bandcamp": {
|
||||||
"errorMsg": "Sorry, that something isn\u2019t here",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 573,
|
"rank": 573,
|
||||||
"url": "https://www.bandcamp.com/{}",
|
"url": "https://www.bandcamp.com/{}",
|
||||||
"urlMain": "https://www.bandcamp.com/"
|
"urlMain": "https://www.bandcamp.com/"
|
||||||
@@ -72,8 +68,7 @@
|
|||||||
"urlMain": "https://basecamp.com/"
|
"urlMain": "https://basecamp.com/"
|
||||||
},
|
},
|
||||||
"Behance": {
|
"Behance": {
|
||||||
"errorMsg": "Oops! We can\u2019t find that page.",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 394,
|
"rank": 394,
|
||||||
"url": "https://www.behance.net/{}",
|
"url": "https://www.behance.net/{}",
|
||||||
"urlMain": "https://www.behance.net/"
|
"urlMain": "https://www.behance.net/"
|
||||||
@@ -99,15 +94,14 @@
|
|||||||
"urlMain": "https://www.blogger.com/"
|
"urlMain": "https://www.blogger.com/"
|
||||||
},
|
},
|
||||||
"BuzzFeed": {
|
"BuzzFeed": {
|
||||||
"errorMsg": "We can't find the page you're looking for.",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 294,
|
"rank": 294,
|
||||||
"url": "https://buzzfeed.com/{}",
|
"url": "https://buzzfeed.com/{}",
|
||||||
"urlMain": "https://buzzfeed.com/"
|
"urlMain": "https://buzzfeed.com/"
|
||||||
},
|
},
|
||||||
"Canva": {
|
"Canva": {
|
||||||
"errorMsg": "Not found (404)",
|
"errorType": "response_url",
|
||||||
"errorType": "message",
|
"errorUrl": "https://www.canva.com/{}",
|
||||||
"rank": 215,
|
"rank": 215,
|
||||||
"url": "https://www.canva.com/{}",
|
"url": "https://www.canva.com/{}",
|
||||||
"urlMain": "https://www.canva.com/"
|
"urlMain": "https://www.canva.com/"
|
||||||
@@ -132,15 +126,13 @@
|
|||||||
"urlMain": "https://www.cloob.com/"
|
"urlMain": "https://www.cloob.com/"
|
||||||
},
|
},
|
||||||
"Codecademy": {
|
"Codecademy": {
|
||||||
"errorMsg": "404 error",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 2314,
|
"rank": 2314,
|
||||||
"url": "https://www.codecademy.com/{}",
|
"url": "https://www.codecademy.com/{}",
|
||||||
"urlMain": "https://www.codecademy.com/"
|
"urlMain": "https://www.codecademy.com/"
|
||||||
},
|
},
|
||||||
"Codementor": {
|
"Codementor": {
|
||||||
"errorMsg": "404",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 12456,
|
"rank": 12456,
|
||||||
"url": "https://www.codementor.io/{}",
|
"url": "https://www.codementor.io/{}",
|
||||||
"urlMain": "https://www.codementor.io/"
|
"urlMain": "https://www.codementor.io/"
|
||||||
@@ -205,10 +197,9 @@
|
|||||||
"urlMain": "https://www.dailymotion.com/"
|
"urlMain": "https://www.dailymotion.com/"
|
||||||
},
|
},
|
||||||
"Designspiration": {
|
"Designspiration": {
|
||||||
"errorMsg": "Content Not Found",
|
"errorType": "status_code",
|
||||||
"errorType": "message",
|
|
||||||
"rank": 24722,
|
"rank": 24722,
|
||||||
"url": "https://www.designspiration.net/{}",
|
"url": "https://www.designspiration.net/{}/",
|
||||||
"urlMain": "https://www.designspiration.net/"
|
"urlMain": "https://www.designspiration.net/"
|
||||||
},
|
},
|
||||||
"DeviantART": {
|
"DeviantART": {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import os
|
|||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import random
|
||||||
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
from argparse import ArgumentParser, RawDescriptionHelpFormatter
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from time import time
|
from time import time
|
||||||
|
|||||||
+94
-2
@@ -112,7 +112,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest):
|
|||||||
self.username_check(['noonewouldeverusethis7'],
|
self.username_check(['noonewouldeverusethis7'],
|
||||||
["Pinterest", "iMGSRC.RU", "Pastebin",
|
["Pinterest", "iMGSRC.RU", "Pastebin",
|
||||||
"WordPress", "devRant", "ImageShack", "MeetMe",
|
"WordPress", "devRant", "ImageShack", "MeetMe",
|
||||||
"EyeEm", "CreativeMarket", "EVE Online"
|
"EyeEm", "CreativeMarket", "EVE Online", "Canva"
|
||||||
],
|
],
|
||||||
exist_check=False
|
exist_check=False
|
||||||
)
|
)
|
||||||
@@ -136,7 +136,99 @@ class SherlockSiteCoverageTests(SherlockBaseTest):
|
|||||||
self.username_check(['blue'],
|
self.username_check(['blue'],
|
||||||
["Pinterest", "iMGSRC.RU", "Pastebin",
|
["Pinterest", "iMGSRC.RU", "Pastebin",
|
||||||
"WordPress", "devRant", "ImageShack", "MeetMe",
|
"WordPress", "devRant", "ImageShack", "MeetMe",
|
||||||
"EyeEm", "CreativeMarket", "EVE Online"
|
"EyeEm", "CreativeMarket", "EVE Online", "Canva"
|
||||||
|
],
|
||||||
|
exist_check=True
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def test_coverage_false_via_status(self):
|
||||||
|
"""Test Username Does Not Exist Site Coverage (Via HTTP Status).
|
||||||
|
|
||||||
|
This test checks all sites with the "HTTP Status" detection mechanism
|
||||||
|
to ensure that a Username that does not exist is reported that way.
|
||||||
|
|
||||||
|
Keyword Arguments:
|
||||||
|
self -- This object.
|
||||||
|
|
||||||
|
Return Value:
|
||||||
|
N/A.
|
||||||
|
Will trigger an assert if detection mechanism did not work as expected.
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.username_check(['noonewouldeverusethis7'],
|
||||||
|
["Academia.edu", "9GAG", "About.me", "AngelList",
|
||||||
|
"BLIP.fm", "Bandcamp", "Behance", "BuzzFeed",
|
||||||
|
"Codecademy", "Codementor", "Designspiration"
|
||||||
|
],
|
||||||
|
exist_check=False
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def test_coverage_true_via_status(self):
|
||||||
|
"""Test Username Does Exist Site Coverage (Via HTTP Status).
|
||||||
|
|
||||||
|
This test checks all sites with the "HTTP Status" detection mechanism
|
||||||
|
to ensure that a Username that does exist is reported that way.
|
||||||
|
|
||||||
|
Keyword Arguments:
|
||||||
|
self -- This object.
|
||||||
|
|
||||||
|
Return Value:
|
||||||
|
N/A.
|
||||||
|
Will trigger an assert if detection mechanism did not work as expected.
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.username_check(['blue'],
|
||||||
|
["Academia.edu", "9GAG", "About.me", "AngelList",
|
||||||
|
"BLIP.fm", "Bandcamp", "Behance", "BuzzFeed",
|
||||||
|
"Codecademy", "Codementor", "Designspiration"
|
||||||
|
],
|
||||||
|
exist_check=True
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def test_coverage_false_via_message(self):
|
||||||
|
"""Test Username Does Not Exist Site Coverage (Via Error Message).
|
||||||
|
|
||||||
|
This test checks all sites with the "Error Message" detection mechanism
|
||||||
|
to ensure that a Username that does not exist is reported that way.
|
||||||
|
|
||||||
|
Keyword Arguments:
|
||||||
|
self -- This object.
|
||||||
|
|
||||||
|
Return Value:
|
||||||
|
N/A.
|
||||||
|
Will trigger an assert if detection mechanism did not work as expected.
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.username_check(['noonewouldeverusethis7'],
|
||||||
|
["Dribbble"
|
||||||
|
],
|
||||||
|
exist_check=False
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def test_coverage_true_via_message(self):
|
||||||
|
"""Test Username Does Exist Site Coverage (Via Error Message).
|
||||||
|
|
||||||
|
This test checks all sites with the "Error Message" detection mechanism
|
||||||
|
to ensure that a Username that does exist is reported that way.
|
||||||
|
|
||||||
|
Keyword Arguments:
|
||||||
|
self -- This object.
|
||||||
|
|
||||||
|
Return Value:
|
||||||
|
N/A.
|
||||||
|
Will trigger an assert if detection mechanism did not work as expected.
|
||||||
|
"""
|
||||||
|
|
||||||
|
self.username_check(['blue'],
|
||||||
|
["Dribbble"
|
||||||
],
|
],
|
||||||
exist_check=True
|
exist_check=True
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user