示例#1
0
def test_valid_login():
    result = authentication.is_valid_login(
        {
            'username': '******',
            'password': '******'
        }, 'sally', '123')

    assert result == True
示例#2
0
def test_user_record_password_does_not_match():
    result = authentication.is_valid_login(
        {
            'username': '******',
            'password': '******'
        }, 'sally', '203880')

    assert result == False
示例#3
0
def test_badly_formated_user_record():
    result = authentication.is_valid_login({'random': 'property'}, 'sally',
                                           '123')

    assert result == False
示例#4
0
def test_no_user_record_is_provided():
    result = authentication.is_valid_login(None, 'username', 'password')
    assert result == False