From 26ef2e1b9bc6b7162f3e6f196f68455585673393 Mon Sep 17 00:00:00 2001 From: "Christopher K. Hoadley" Date: Wed, 30 Jan 2019 18:10:06 -0600 Subject: [PATCH] Convert Codementor to use the Status Code detection method. The site gives a clean 404 error. Add to tests. --- data.json | 3 +-- tests/all.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/data.json b/data.json index 57dfe48e..0ab091b6 100644 --- a/data.json +++ b/data.json @@ -132,8 +132,7 @@ "urlMain": "https://www.codecademy.com/" }, "Codementor": { - "errorMsg": "404", - "errorType": "message", + "errorType": "status_code", "rank": 12456, "url": "https://www.codementor.io/{}", "urlMain": "https://www.codementor.io/" diff --git a/tests/all.py b/tests/all.py index d32d1f02..d85b0ffc 100644 --- a/tests/all.py +++ b/tests/all.py @@ -160,7 +160,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self.username_check(['noonewouldeverusethis7'], ["Academia.edu", "9GAG", "About.me", "AngelList", "BLIP.fm", "Bandcamp", "Behance", "BuzzFeed", - "Codecademy" + "Codecademy", "Codementor" ], exist_check=False ) @@ -184,7 +184,7 @@ class SherlockSiteCoverageTests(SherlockBaseTest): self.username_check(['blue'], ["Academia.edu", "9GAG", "About.me", "AngelList", "BLIP.fm", "Bandcamp", "Behance", "BuzzFeed", - "Codecademy" + "Codecademy", "Codementor" ], exist_check=True )