From 29b1f56e7807d029f4f7b4f70ff936b7194cdf50 Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Thu, 27 Oct 2022 12:32:40 -0400 Subject: [PATCH] Fix failing tests asu.edu has changed its hosting provider, so the tests were failing as written. Co-authored-by: Yablargo <> --- tests/test_cdnengine.py | 12 ++++++------ tests/test_detectCDN.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_cdnengine.py b/tests/test_cdnengine.py index 4cb06d0..3223c0c 100644 --- a/tests/test_cdnengine.py +++ b/tests/test_cdnengine.py @@ -48,10 +48,10 @@ def test_grab_cdn(): # Assertions assert checked_domains[0].cdns == [ - ".cloudflare.net", - ".cloudflare.com", + ".fastly.net", + ".nocookie.net", ], "Did not detect {} from {}.".format( - [".cloudflare.net", ".cloudflare.com"], checked_domains[0].url + [".fastly.net", ".nocookie.net"], checked_domains[0].url ) assert checked_domains[1].cdns == [ ".cloudfront.net", @@ -80,8 +80,8 @@ def test_has_cdn(): assert cdn_present == 3, "Too many cdn_present domains counted." assert checked_domains[0].url == "asu.edu" and checked_domains[0].cdns == [ - ".cloudflare.net", - ".cloudflare.com", + ".fastly.net", + ".nocookie.net", ], ( "Incorrect CDN detected for %s" % checked_domains[0].url ) @@ -110,7 +110,7 @@ def test_run_checks_present(): if dom.cdn_present: cdn_present[dom.url] = dom.cdns expected = { - "asu.edu": [".cloudflare.net", ".cloudflare.com"], + "asu.edu": [".fastly.net", ".nocookie.net"], "censys.io": [".cloudflare.com"], "adobe.com": [".edgesuite.net", ".akamaitechnologies.fr"], } diff --git a/tests/test_detectCDN.py b/tests/test_detectCDN.py index f2c90b4..e5a0054 100644 --- a/tests/test_detectCDN.py +++ b/tests/test_detectCDN.py @@ -53,8 +53,8 @@ def test_cname(): check.cname(dom_in, timeout=TIMEOUT) assert ( - "www.asu.edu.cdn.cloudflare.net." in dom_in.cnames - ), "www.asu.edu should have www.asu.edu.cdn.cloudflare.net. as a cname" + "pantheon-systems.map.fastly.net." in dom_in.cnames + ), "www.asu.edu should have pantheon-systems.map.fastly.net. as a cname" def test_broken_cname():