Skip to content

Commit

Permalink
addresses PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Dec 14, 2024
1 parent 941ba11 commit a03a578
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions lib/models/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/test_routes/test_flights_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit a03a578

Please sign in to comment.