Add type hints to test_login.py

This commit is contained in:
Raphael Pierzina 2018-06-28 13:11:22 +02:00
Родитель eb4fefe1a1
Коммит 734c4dacd9
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -3,12 +3,16 @@
"""UI tests for the login page."""
import pytest
from selenium.common.exceptions import TimeoutException
from models.user import User
from pages.login import LoginPage
@pytest.mark.nondestructive
def test_login_wrong_user_credentials(login_page, unknown_user):
def test_login_wrong_user_credentials(
login_page: LoginPage, unknown_user: User
) -> None:
"""Test for a failed login attempt."""
assert login_page.title == "Login to Redash"
@ -22,7 +26,7 @@ def test_login_wrong_user_credentials(login_page, unknown_user):
@pytest.mark.nondestructive
def test_login(login_page, user):
def test_login(login_page: LoginPage, user: User) -> None:
"""Test for a successful login attempt."""
assert login_page.title == "Login to Redash"