|
|
@ -119,13 +119,7 @@ def prefilled_repo(): |
|
|
|
from ordr3.models import OrderItem, OrderStatus, Vendor |
|
|
|
from ordr3.models import OrderItem, OrderStatus, Vendor |
|
|
|
|
|
|
|
|
|
|
|
i = count() |
|
|
|
i = count() |
|
|
|
catalog = { |
|
|
|
catalog = {1: "Ethanol", 2: "Aceton", 3: "NaOH", 4: "Coffee", 5: "Water"} |
|
|
|
1: "Ethanol", |
|
|
|
|
|
|
|
2: "Aceton", |
|
|
|
|
|
|
|
3: "NaOH", |
|
|
|
|
|
|
|
4: "Coffee", |
|
|
|
|
|
|
|
5: "Water", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _create_order(item, date, status): |
|
|
|
def _create_order(item, date, status): |
|
|
|
order = OrderItem(next(i), catalog[item], item, "", "", "", "", "") |
|
|
|
order = OrderItem(next(i), catalog[item], item, "", "", "", "", "") |
|
|
@ -221,7 +215,7 @@ def test_create_log_entry_not_noteworthy_same_status(prefilled_repo): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize( |
|
|
|
@pytest.mark.parametrize( |
|
|
|
"update,new_hash", [(False, "1234"), (True, "4321"),], # noqa: E231 |
|
|
|
"update,new_hash", [(False, "1234"), (True, "4321")] # noqa: E231 |
|
|
|
) |
|
|
|
) |
|
|
|
def test_verify_username_and_password_valid(update, new_hash): |
|
|
|
def test_verify_username_and_password_valid(update, new_hash): |
|
|
|
from ordr3.models import User, UserRole |
|
|
|
from ordr3.models import User, UserRole |
|
|
@ -238,7 +232,7 @@ def test_verify_username_and_password_valid(update, new_hash): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize( |
|
|
|
@pytest.mark.parametrize( |
|
|
|
"name,pwd", [("You", "1234"), ("Me", "abcd"),], # noqa: E231 |
|
|
|
"name,pwd", [("You", "1234"), ("Me", "abcd")] # noqa: E231 |
|
|
|
) |
|
|
|
) |
|
|
|
def test_verify_username_and_password_invalid(name, pwd): |
|
|
|
def test_verify_username_and_password_invalid(name, pwd): |
|
|
|
from ordr3.models import User, UserRole |
|
|
|
from ordr3.models import User, UserRole |
|
|
|