Exemplo n.º 1
0
 def test_custom_message(self):
     string_value, http_code = app_util.http_error_handler(
         exceptions.HTTPError(httplib.BAD_GATEWAY, 'Foo Error'))
     self.assertEquals(string_value, 'Foo Error')
     self.assertEquals(http_code, httplib.BAD_GATEWAY)
Exemplo n.º 2
0
 def test_custom_message(self):
     string_value, http_code = app_util.http_error_handler(
         exceptions.HTTPError(httplib.BAD_GATEWAY, 'Foo Error'))
     self.assertEquals(string_value, 'Foo Error')
     self.assertEquals(http_code, httplib.BAD_GATEWAY)
Exemplo n.º 3
0
 def test_default_message(self):
     string_value, http_code = app_util.http_error_handler(
         exceptions.HTTPError(httplib.NOT_FOUND))
     self.assertEquals(string_value, httplib.responses[httplib.NOT_FOUND])
     self.assertEquals(http_code, httplib.NOT_FOUND)
Exemplo n.º 4
0
 def test_default_message(self):
     string_value, http_code = app_util.http_error_handler(
         exceptions.HTTPError(httplib.NOT_FOUND))
     self.assertEquals(string_value, httplib.responses[httplib.NOT_FOUND])
     self.assertEquals(http_code, httplib.NOT_FOUND)