|
|
|
@ -8,7 +8,7 @@ def test_password_reset(testapp, parse_latest_mail):
@@ -8,7 +8,7 @@ def test_password_reset(testapp, parse_latest_mail):
|
|
|
|
|
|
|
|
|
|
form = response.form |
|
|
|
|
form["username"] = "TestAdmin" |
|
|
|
|
form["password"] = "jixx" |
|
|
|
|
form["password"] = "jixx" # noqa: S105 |
|
|
|
|
response = form.submit("Log In") |
|
|
|
|
assert "Credentials are invalid" in response |
|
|
|
|
|
|
|
|
@ -27,21 +27,21 @@ def test_password_reset(testapp, parse_latest_mail):
@@ -27,21 +27,21 @@ def test_password_reset(testapp, parse_latest_mail):
|
|
|
|
|
assert "You can now set a new password" in response |
|
|
|
|
|
|
|
|
|
form = response.form |
|
|
|
|
form["new_password"] = "jixx" |
|
|
|
|
form["new_password"] = "jixx" # noqa: S105 |
|
|
|
|
response = form.submit("Reset_Password").follow() |
|
|
|
|
assert "You changed your Password." in response |
|
|
|
|
|
|
|
|
|
response = testapp.get("/", status=302).follow() |
|
|
|
|
form = response.form |
|
|
|
|
form["username"] = "TestAdmin" |
|
|
|
|
form["password"] = "jane" |
|
|
|
|
form["password"] = "jane" # noqa: S105 |
|
|
|
|
response = form.submit("Log In") |
|
|
|
|
assert "Credentials are invalid" in response |
|
|
|
|
|
|
|
|
|
response = testapp.get("/", status=302).follow() |
|
|
|
|
form = response.form |
|
|
|
|
form["username"] = "TestAdmin" |
|
|
|
|
form["password"] = "jixx" |
|
|
|
|
form["password"] = "jixx" # noqa: S105 |
|
|
|
|
response = form.submit("Log In").follow() |
|
|
|
|
assert "My Orders" in response |
|
|
|
|
|
|
|
|
@ -100,14 +100,14 @@ def test_password_reset_cancel_after_token(testapp, parse_latest_mail):
@@ -100,14 +100,14 @@ def test_password_reset_cancel_after_token(testapp, parse_latest_mail):
|
|
|
|
|
assert "You can now set a new password" in response |
|
|
|
|
|
|
|
|
|
form = response.form |
|
|
|
|
form["new_password"] = "jixx" |
|
|
|
|
form["new_password"] = "jixx" # noqa: S105 |
|
|
|
|
response = form.submit("Cancel").follow(status=302).follow() |
|
|
|
|
assert "Please Log In" in response |
|
|
|
|
|
|
|
|
|
response = testapp.get("/", status=302).follow() |
|
|
|
|
form = response.form |
|
|
|
|
form["username"] = "TestAdmin" |
|
|
|
|
form["password"] = "jane" |
|
|
|
|
form["password"] = "jane" # noqa: S105 |
|
|
|
|
response = form.submit("Log In").follow() |
|
|
|
|
assert "My Orders" in response |
|
|
|
|
|
|
|
|
@ -132,7 +132,7 @@ def test_password_reset_empty_password(testapp, parse_latest_mail):
@@ -132,7 +132,7 @@ def test_password_reset_empty_password(testapp, parse_latest_mail):
|
|
|
|
|
assert "You can now set a new password" in response |
|
|
|
|
|
|
|
|
|
form = response.form |
|
|
|
|
form["new_password"] = "" |
|
|
|
|
form["new_password"] = "" # noqa: S105 |
|
|
|
|
response = form.submit("Reset_Password") |
|
|
|
|
assert "There was a problem with your submission" in response |
|
|
|
|
|
|
|
|
@ -167,12 +167,12 @@ def test_password_reset_form_invalid_token(testapp, parse_latest_mail):
@@ -167,12 +167,12 @@ def test_password_reset_form_invalid_token(testapp, parse_latest_mail):
|
|
|
|
|
|
|
|
|
|
form = response.form |
|
|
|
|
form.action = "/reset?t=invalid" |
|
|
|
|
form["new_password"] = "jixx" |
|
|
|
|
form["new_password"] = "jixx" # noqa: S105 |
|
|
|
|
response = form.submit("Reset_Password").follow(status=302).follow() |
|
|
|
|
assert "Please Log In" in response |
|
|
|
|
|
|
|
|
|
form = response.form |
|
|
|
|
form["username"] = "TestAdmin" |
|
|
|
|
form["password"] = "jane" |
|
|
|
|
form["password"] = "jane" # noqa: S105 |
|
|
|
|
response = form.submit("Log In").follow() |
|
|
|
|
assert "My Orders" in response |
|
|
|
|