def setUp(self): bs = bootstrap('demo.ini') app = bs['app'] self.request = bs['request'] from webtest import TestApp self.testapp = TestApp(app) self.demos = DeformDemo(self.request)
def setUp(self): bs = bootstrap("demo.ini") app = bs["app"] self.request = bs["request"] from webtest import TestApp self.testapp = TestApp(app) self.demos = DeformDemo(self.request)
class FunctionalTests(unittest.TestCase): def setUp(self): bs = bootstrap("demo.ini") app = bs["app"] self.request = bs["request"] from webtest import TestApp self.testapp = TestApp(app) self.demos = DeformDemo(self.request) def test_valid_html(self): errors = [] demos_urls = self.demos.get_demos() for demo in demos_urls: res = self.testapp.get(demo[1], status=200) check = validate(res.body) # import pdb; pdb.set_trace() # NOQA try: self.assertFalse(check) print(demo[0], ".") except AssertionError: errors.append((demo[0], check)) print(demo[0], "E") print(check) print("")