Skip to content

Commit 8a8e680

Browse files
addresses PR review
1 parent 83cd380 commit 8a8e680

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

lib/models/rocket.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ class CoordinateSystemOrientation(str, Enum):
1818

1919
class Rocket(BaseModel):
2020

21-
def __eq__(self, other):
22-
if not isinstance(other, Rocket):
23-
return False
24-
return self.dict() == other.dict()
25-
2621
# Required parameters
2722
motor: Motor
2823
radius: float

tests/test_routes/test_flights_route.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ def test_update_rocket_by_flight_id(stub_rocket):
217217
'flight_id': '123',
218218
'message': 'Flight successfully updated',
219219
}
220-
mock_update_flight.assert_called_once_with(
221-
'123', rocket=Rocket(**stub_rocket)
222-
)
220+
assert mock_update_flight.call_count == 1
221+
assert mock_update_flight.call_args[0][0] == '123'
222+
assert mock_update_flight.call_args[1]['rocket'].model_dump() == Rocket(**stub_rocket).model_dump()
223223

224224

225225
def test_update_env_by_flight_id_invalid_input():

0 commit comments

Comments
 (0)