Convert all supported HTTP Status Code sites to use JSON driven tests.

pull/160/head
Christopher K. Hoadley 6 years ago
parent be59b91107
commit a576af358f

@ -10,25 +10,33 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 331, "rank": 331,
"url": "https://9gag.com/u/{}", "url": "https://9gag.com/u/{}",
"urlMain": "https://9gag.com/" "urlMain": "https://9gag.com/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"About.me": { "About.me": {
"errorType": "status_code", "errorType": "status_code",
"rank": 12674, "rank": 12674,
"url": "https://about.me/{}", "url": "https://about.me/{}",
"urlMain": "https://about.me/" "urlMain": "https://about.me/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Academia.edu": { "Academia.edu": {
"errorType": "status_code", "errorType": "status_code",
"rank": 383, "rank": 383,
"url": "https://independent.academia.edu/{}", "url": "https://independent.academia.edu/{}",
"urlMain": "https://www.academia.edu/" "urlMain": "https://www.academia.edu/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"AngelList": { "AngelList": {
"errorType": "status_code", "errorType": "status_code",
"rank": 3371, "rank": 3371,
"url": "https://angel.co/{}", "url": "https://angel.co/{}",
"urlMain": "https://angel.co/" "urlMain": "https://angel.co/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Aptoide": { "Aptoide": {
"errorType": "status_code", "errorType": "status_code",
@ -46,7 +54,9 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 282942, "rank": 282942,
"url": "https://blip.fm/{}", "url": "https://blip.fm/{}",
"urlMain": "https://blip.fm/" "urlMain": "https://blip.fm/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Badoo": { "Badoo": {
"errorType": "status_code", "errorType": "status_code",
@ -58,7 +68,9 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 568, "rank": 568,
"url": "https://www.bandcamp.com/{}", "url": "https://www.bandcamp.com/{}",
"urlMain": "https://www.bandcamp.com/" "urlMain": "https://www.bandcamp.com/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Basecamp": { "Basecamp": {
"errorMsg": "The account you were looking for doesn't exist", "errorMsg": "The account you were looking for doesn't exist",
@ -71,7 +83,9 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 401, "rank": 401,
"url": "https://www.behance.net/{}", "url": "https://www.behance.net/{}",
"urlMain": "https://www.behance.net/" "urlMain": "https://www.behance.net/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"BitBucket": { "BitBucket": {
"errorType": "status_code", "errorType": "status_code",
@ -97,7 +111,9 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 294, "rank": 294,
"url": "https://buzzfeed.com/{}", "url": "https://buzzfeed.com/{}",
"urlMain": "https://buzzfeed.com/" "urlMain": "https://buzzfeed.com/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Canva": { "Canva": {
"errorType": "response_url", "errorType": "response_url",
@ -129,13 +145,17 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 2325, "rank": 2325,
"url": "https://www.codecademy.com/{}", "url": "https://www.codecademy.com/{}",
"urlMain": "https://www.codecademy.com/" "urlMain": "https://www.codecademy.com/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Codementor": { "Codementor": {
"errorType": "status_code", "errorType": "status_code",
"rank": 12164, "rank": 12164,
"url": "https://www.codementor.io/{}", "url": "https://www.codementor.io/{}",
"urlMain": "https://www.codementor.io/" "urlMain": "https://www.codementor.io/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"Codepen": { "Codepen": {
"errorType": "status_code", "errorType": "status_code",
@ -200,7 +220,9 @@
"errorType": "status_code", "errorType": "status_code",
"rank": 24423, "rank": 24423,
"url": "https://www.designspiration.net/{}/", "url": "https://www.designspiration.net/{}/",
"urlMain": "https://www.designspiration.net/" "urlMain": "https://www.designspiration.net/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
}, },
"DeviantART": { "DeviantART": {
"errorType": "status_code", "errorType": "status_code",

@ -157,13 +157,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest):
Will trigger an assert if detection mechanism did not work as expected. Will trigger an assert if detection mechanism did not work as expected.
""" """
self.username_check(['noonewouldeverusethis7'], self.detect_type_check("status_code", exist_check=False)
["Academia.edu", "9GAG", "About.me", "AngelList",
"BLIP.fm", "Bandcamp", "Behance", "BuzzFeed",
"Codecademy", "Codementor", "Designspiration"
],
exist_check=False
)
return return
@ -181,13 +175,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest):
Will trigger an assert if detection mechanism did not work as expected. Will trigger an assert if detection mechanism did not work as expected.
""" """
self.username_check(['blue'], self.detect_type_check("status_code", exist_check=True)
["Academia.edu", "9GAG", "About.me", "AngelList",
"BLIP.fm", "Bandcamp", "Behance", "BuzzFeed",
"Codecademy", "Codementor", "Designspiration"
],
exist_check=True
)
return return

Loading…
Cancel
Save