

def test_complex(self):
    check_link = (lambda response, url, label: self.assertContains(response, '<li><a href="{0}">{1}</a></li>'.format(url, label)))
    url = '?'.join((self.url('home'), 'q={0}'.format(TEST_QUERY)))
    response = self.client.get(url)
    self.assert200(response)
    self.assertContains(response, 'Blueprint views')
    check_link(response, self.url('testblueprint.test'), 'Test page')
    check_link(response, '?'.join((self.url('testblueprint.advanced'), 'q={0}'.format(TEST_QUERY))), 'Advanced test page')
    check_link(response, self.url('testblueprint.custom_error', code=403), '403 page')
    check_link(response, self.url('testblueprint.gone'), '410 page')

dataset/ETHPy150Open playpauseandstop/Flask-LazyViews/testapp/testblueprint/tests.py TestBlueprint.test_complex/original