diff --git a/tests/test_powerball.py b/tests/test_powerball.py index fe00044..6ec700d 100644 --- a/tests/test_powerball.py +++ b/tests/test_powerball.py @@ -48,8 +48,8 @@ def test_powerball_draw_integrity(db_session) -> None: assert True -def test_powerball_draw_repr_and_str(db_session) -> None: - """test the __repr__ and __str__ methods of PowerballDraw""" +def test_powerball_draw_eq_repr_and_str(db_session) -> None: + """test the __eq__, __repr__ and __str__ methods of PowerballDraw""" date = datetime(2010, 2, 3).date() new_record = PowerballDraw(draw_date=date, main_ball1=17, main_ball2=22, main_ball3=36, main_ball4=37, main_ball5=52, powerball=24, power_play=2) @@ -61,6 +61,8 @@ def test_powerball_draw_repr_and_str(db_session) -> None: # query the record record = db_session.query(PowerballDraw).filter_by(draw_date=date).first() - # compare the str and repr values of each + # compare the str and repr values of each using __eq__ assert str(record) == str(new_record) assert repr(record) == repr(new_record) + +