

def test_error_handled(self):
    url = self.url('testblueprint.custom_error', code=403)
    response = self.client.get(url)
    self.assertStatus(response, 403)
    self.assertContains(response, 'Error 403: Forbidden')
    self.assertContains(response, 'This error page generated from Blueprint.')
    response = self.client.get(self.url('testblueprint.gone'))
    self.assertStatus(response, 410)
    self.assertContains(response, 'Error 410: Gone')
    self.assertContains(response, 'This error page generated from Blueprint.')

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