]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
make the unit test of the overwrite button more general
authorZooko O'Whielacronx <zooko@zooko.com>
Thu, 20 Dec 2007 22:23:07 +0000 (15:23 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Thu, 20 Dec 2007 22:23:07 +0000 (15:23 -0700)
src/allmydata/test/test_web.py

index 5e87e3751f0e47ee7f053ff06e5c724278bf75a6..1c96c8d397699b5f01e811db8e24734b764d9c1e 100644 (file)
@@ -1002,8 +1002,8 @@ class Web(WebMixin, unittest.TestCase):
 
         # test that clicking on the "overwrite" button works
         EVEN_NEWER_CONTENTS = NEWER_CONTENTS + "even newer\n"
-        OVERWRITE_FORM_RE=re.compile('<form action="(.*)" method="post" enctype="multipart/form-data"><fieldset><input type="hidden" name="t" value="overwrite" /><input type="hidden" name="name" value="(.*)" /><input type="hidden" name="when_done" value="(.*)" /><legend class="freeform-form-label">Overwrite</legend>Choose new file: <input type="file" class="freeform-input-file" name="file" /> <input type="submit" value="Overwrite" /></fieldset></form>', re.I)
         def _parse_overwrite_form_and_submit(res):
+            OVERWRITE_FORM_RE=re.compile('<form action="([^"]*)" method="post" .*<input type="hidden" name="t" value="overwrite" /><input type="hidden" name="name" value="([^"]*)" /><input type="hidden" name="when_done" value="([^"]*)" />', re.I)
             mo = OVERWRITE_FORM_RE.search(res)
             self.failUnless(mo)
             formaction=mo.group(1)