def test_form_post_send(self): assert_function = self.assertNotEqual class StaticSite(object): def download_page(self, url, parameters=None, remember_visited=None): assert_function(parameters, None) doc = '<form method="post"><input type="text" name="test" ' + 'value="random"></input></form>' doc = ET.fromstring(doc) form = webvulnscan.form.Form("http://test/", doc) parameters = dict(form.get_parameters()) form.send(StaticSite(), parameters)
def test_form_post_send(self): assert_function = self.assertNotEqual class StaticSite(object): def download_page(self, url, parameters=None, remember_visited=None): assert_function(parameters, None) doc = '<form method="post"><input type="text" name="test" ' + \ 'value="random"></input></form>' doc = ET.fromstring(doc) form = webvulnscan.form.Form('http://test/', doc) parameters = dict(form.get_parameters()) form.send(StaticSite(), parameters)