def test_genre_methods():
    genre1 = Genre('Horror')
    assert genre1.__repr__() == '<Genre Horror>'
    genre2 = Genre('Comedy')
    assert genre1.__lt__(genre2) == False
    assert genre1.__lt__(genre1) == False
    assert genre2.__lt__(genre1) == True
    genre3 = Genre(56)
    assert genre3.genre is None

    assert genre1.__eq__(genre1) == True
Esempio n. 2
0
def test_genre_false_eq_function():
    genre1 = Genre("Comedy")
    genre2 = Genre(" ")
    assert genre1.__eq__(genre2) is False