Example #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)
Example #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)
Example #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)
Example #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)