]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/app/__init__.py
Add inclusions and exclusions for web verification.
[wizard.git] / wizard / app / __init__.py
index f1ad52bd7572418f8f1c2217474860f9628d37dd..ae99e3e58dfa34aebe3916c4f370f186a2bcfe00 100644 (file)
@@ -373,11 +373,15 @@ class Application(object):
             not to depend on pages that are not the main page.
         """
         raise NotImplementedError
-    def checkWebPage(self, deployment, page, *outputs):
+    def checkWebPage(self, deployment, page, outputs=[], exclude=[]):
         """
         Checks if a given page of an autoinstall contains a particular string.
         """
         page = deployment.fetch(page)
+        for x in exclude:
+            if page.find(x) != -1:
+                logging.info("checkWebPage (failed due to %s):\n\n%s", x, page)
+                return False
         votes = 0
         for output in outputs:
             votes += page.find(output) != -1