コード例 #1
0
def test_user_methods():
    user1 = User('Martin', 'pw12345')
    user2 = User('Ian', 'pw67890')
    user3 = User('Daniel', 'pw87465')
    user4 = User('Martin', 'pw1255')
    assert user1.__eq__(user2) == False
    assert user1.__eq__(user1) == True
    assert user1.__eq__(user4) == True
    assert user3.__lt__(user1) == True
    assert user3.__lt__(user3) == False
    assert user1.__lt__(user3) == False
コード例 #2
0
def test_user_false_lt_function():
    user1 = User("Jenna da Cruz", "testing123")
    user2 = User("Jessica da Cruz", "testing1234")
    assert user2.__lt__(user1) is False
コード例 #3
0
def test_user_lt_function():
    user1 = User("Jenna da Cruz", "testing123")
    user2 = User("Jessica da Cruz", "testing1234")
    assert user1.__lt__(user2) is True