bugs in website check for git.csc
authorMatthew McPherrin <matthew@mcpherrin.ca>
Wed, 17 Oct 2012 23:46:52 +0000 (19:46 -0400)
committerMatthew McPherrin <matthew@mcpherrin.ca>
Wed, 17 Oct 2012 23:46:52 +0000 (19:46 -0400)
tests.d/50_website.py

index bc15ec7..9b0bb05 100755 (executable)
@@ -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