From 110b93a757439645f5e5cbc278c9e77a5a0fdabc Mon Sep 17 00:00:00 2001 From: "Christopher K. Hoadley" Date: Wed, 30 Jan 2019 18:07:29 -0600 Subject: [PATCH] Convert Codecademy to use the Status Code detection method. The site gives a clean 404 error. Add to tests. --- data.json | 3 +-- tests/all.py | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/data.json b/data.json index e40a97df..57dfe48e 100644 --- a/data.json +++ b/data.json @@ -126,8 +126,7 @@ "urlMain": "https://www.cloob.com/" }, "Codecademy": { - "errorMsg": "404 error", - "errorType": "message", + "errorType": "status_code", "rank": 2314, "url": "https://www.codecademy.com/{}", "urlMain": "https://www.codecademy.com/" diff --git a/tests/all.py b/tests/all.py index 395945d2..d32d1f02 100644 --- a/tests/all.py +++ b/tests/all.py @@ -159,7 +159,8 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self.username_check(['noonewouldeverusethis7'], ["Academia.edu", "9GAG", "About.me", "AngelList", - "BLIP.fm", "Bandcamp", "Behance", "BuzzFeed" + "BLIP.fm", "Bandcamp", "Behance", "BuzzFeed", + "Codecademy" ], exist_check=False ) @@ -182,7 +183,8 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self.username_check(['blue'], ["Academia.edu", "9GAG", "About.me", "AngelList", - "BLIP.fm", "Bandcamp", "Behance", "BuzzFeed" + "BLIP.fm", "Bandcamp", "Behance", "BuzzFeed", + "Codecademy" ], exist_check=True )