예제 #1
0
 def test_default_error(self, server_error):
     with pytest.raises(RestError):
         handle_response_failure(server_error)
예제 #2
0
 def test_validation_error(self, client_error):
     with pytest.raises(ValidationError):
         handle_response_failure(client_error)
예제 #3
0
 def test_connection_error(self, connection_error):
     with pytest.raises(RestConnectionError):
         handle_response_failure(connection_error)
예제 #4
0
 def test_too_large_error(self, too_large):
     with pytest.raises(TooLargeError):
         handle_response_failure(too_large)
예제 #5
0
 def test_conflict_error(self, conflict):
     with pytest.raises(ConflictError):
         handle_response_failure(conflict)
예제 #6
0
 def test_wait_exceeded_error(self, wait_exceeded):
     with pytest.raises(WaitExceededError):
         handle_response_failure(wait_exceeded)
예제 #7
0
 def test_not_found_error(self, not_found):
     with pytest.raises(NotFoundError):
         handle_response_failure(not_found)
예제 #8
0
 def test_not_found_allowed(self, not_found):
     assert handle_response_failure(not_found, raise_404=False) is None