def test_template(self): response = template_view() self.assertIn('<h1>Hello, world!</h1>', response.body) self.assertIn('<pre>This is random string', response.body) self.assertIn( '<a href="{}">'.format(routes.reverse('hello')), response.body )
def url(self, url_rule, *args, **kwargs): return routes.reverse(url_rule, *args, **kwargs)