bugs in website check for git.csc

master
Matthew McPherrin 10 years ago
parent 365e27f9e4
commit 60a2bf2d06
  1. 8
      tests.d/50_website.py

@ -5,15 +5,15 @@ pages=["https://csclub.uwaterloo.ca",
"http://mirror.csclub.uwaterloo.ca",
"http://git.csclub.uwaterloo.ca"]
for page in pages:
for theurl in pages:
try:
r = urllib2.urlopen(page, timeout=3)
r = urllib2.urlopen(theurl, timeout=3)
page = r.read()
if not len(page) > 1000:
print "FAIL, didn't have enough data"
sys.exit(2)
if not"Computer Science Club" in page:
print "FAIL, homepage doesn't mention Computer Science Club"
if not ("Computer Science Club" in page or "git.csclub.uwaterloo.ca Git" in page):
print "FAIL,", theurl, "doesn't mention Computer Science Club"
sys.exit(3)
except urllib2.URLError as e:
print "FAIL, exception ", e

Loading…
Cancel
Save