Пример #1
0
def test_login_valid_credentials():
    response = rest_client.login(
        json_provider.login_json(Valid_User.email, Valid_User.password))
    assert response.status_code == 200
    assert response.json()['token'] is not None
Пример #2
0
def login(client):
    return client.login(
        json_provider.login_json(Valid_User.email,
                                 Valid_User.password)).json()['token']
Пример #3
0
def test_login_invalid_email_and_invalid_password():
    response = rest_client.login(
        json_provider.login_json(Invalid_User.email, Invalid_User.password))
    assert response.status_code == 401