Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
asu.edu has changed its hosting provider, so the tests were failing as
written.

Co-authored-by: Yablargo <<matthew.galligan@gmail.com>>
  • Loading branch information
jsf9k and Yablargo committed Oct 27, 2022
1 parent a36e249 commit 29b1f56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions tests/test_cdnengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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"],
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_detectCDN.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 29b1f56

Please sign in to comment.