예제 #1
0
 def test_ICAPError_init_default_messages(self):
     sut = ICAPError()
     self.assertEqual("Internal Server Error", sut.message)
예제 #2
0
 def test_ICAPError_init_default_code(self):
     sut = ICAPError()
     self.assertEqual(500, sut.code)
예제 #3
0
 def test_ICAPError_init_invalid_http_error_code_negative_message(self):
     sut = ICAPError(-8)
     self.assertEqual("Unknown error code", sut.message)
예제 #4
0
 def test_ICAPError_init_invalid_http_error_code_negative(self):
     sut = ICAPError(-8)
     self.assertEqual(-8, sut.code)
예제 #5
0
 def test_ICAPError_init_invalid_http_error_code(self):
     sut = ICAPError(999)
     self.assertEqual(999, sut.code)
예제 #6
0
 def test_ICAPError_init_non_default_code(self):
     sut = ICAPError(404)
     self.assertEqual(404, sut.code)
예제 #7
0
 def test_ICAPError_init_non_default_message(self):
     sut = ICAPError(400)
     self.assertEqual("Bad Request", sut.message)