Exemple #1
0
def test_auth_login_3():
    reset_data()
    dict1 = auth_register('*****@*****.**', 'mypassword', 'Kevin', 'Yasin')
    token1 = dict1['token']
    auth_logout(token1)
    with pytest.raises(ValueError):
        auth_login("*****@*****.**", "incorrectpass")
Exemple #2
0
def test_auth_login_8():
    reset_data()
    dict1 = auth_register('*****@*****.**', 'mypassword', 'Steven',
                          'Peter')
    token1 = dict1['token']
    auth_logout(token1)
    with pytest.raises(ValueError):
        auth_login("*****@*****.**", "mypasswordwrong")
Exemple #3
0
def test_auth_login_1():
    reset_data()
    dict1 = auth_register('*****@*****.**', 'mypassword', 'Kevin', 'Yasin')
    token1 = dict1['token']
    auth_logout(token1)
    dict2 = auth_login("*****@*****.**", "mypassword")
    token2 = dict2['token']
    assert is_logged_in(token2)
Exemple #4
0
def test_auth_login_2():
    reset_data()
    dict1 = auth_register('*****@*****.**', 'mypassword', 'Steven',
                          'Peter')
    token1 = dict1['token']
    auth_logout(token1)
    dict2 = auth_login("*****@*****.**", "mypassword")
    token2 = dict2['token']
    assert is_logged_in(token2)
Exemple #5
0
def test_auth_login_7():
    reset_data()
    with pytest.raises(ValueError):
        auth_login("", "")
Exemple #6
0
def test_auth_login_5():
    reset_data()
    with pytest.raises(ValueError):
        auth_login("inVAL1D3mail$", "randompass")
Exemple #7
0
def test_auth_login_4():
    reset_data()
    with pytest.raises(ValueError):
        auth_login("*****@*****.**", "randompass")