def test_get_forms_blacklisted(self): html = u"<html><form action='/forbidden'></form></html>" blacklist = ["forbidden"] page = FakePage(html) self.assertEqual(list(page.get_forms(blacklist=blacklist)), [])
def test_get_forms(self): html = u"<html><form action='/test'></form></html>" page = FakePage(html) self.assertNotEqual(list(page.get_forms()), None)
def test_get_forms_blacklisted(self): url = 'http://test/' html = "<html><form action='/forbidden'></form></html>" blacklist = ["forbidden"] page = webvulnscan.page.Page(url, html, {}, 0, blacklist=blacklist) self.assertEqual(list(page.get_forms()), [])
def test_get_forms(self): url = 'http://test/' html = "<html><form action='/test'></form></html>" page = webvulnscan.page.Page(url, html, {}, 0) self.assertNotEqual(list(page.get_forms()), None)