diff --git a/lib/models/rocket.py b/lib/models/rocket.py index e3b4e6c..2f35096 100644 --- a/lib/models/rocket.py +++ b/lib/models/rocket.py @@ -18,11 +18,6 @@ class CoordinateSystemOrientation(str, Enum): class Rocket(BaseModel): - def __eq__(self, other): - if not isinstance(other, Rocket): - return False - return self.dict() == other.dict() - # Required parameters motor: Motor radius: float diff --git a/tests/test_routes/test_flights_route.py b/tests/test_routes/test_flights_route.py index d297145..695fb95 100644 --- a/tests/test_routes/test_flights_route.py +++ b/tests/test_routes/test_flights_route.py @@ -217,9 +217,9 @@ def test_update_rocket_by_flight_id(stub_rocket): 'flight_id': '123', 'message': 'Flight successfully updated', } - mock_update_flight.assert_called_once_with( - '123', rocket=Rocket(**stub_rocket) - ) + assert mock_update_flight.call_count == 1 + assert mock_update_flight.call_args[0][0] == '123' + assert mock_update_flight.call_args[1]['rocket'].model_dump() == Rocket(**stub_rocket).model_dump() def test_update_env_by_flight_id_invalid_input():