Exemplo n.º 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")
Exemplo n.º 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")
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 5
0
def test_auth_login_7():
    reset_data()
    with pytest.raises(ValueError):
        auth_login("", "")
Exemplo n.º 6
0
def test_auth_login_5():
    reset_data()
    with pytest.raises(ValueError):
        auth_login("inVAL1D3mail$", "randompass")
Exemplo n.º 7
0
def test_auth_login_4():
    reset_data()
    with pytest.raises(ValueError):
        auth_login("*****@*****.**", "randompass")