fix tests to use env vars

This commit is contained in:
Kenneth Kehl
2023-09-11 14:23:12 -07:00
parent c7de9dcf6a
commit f813a403a9
2 changed files with 25 additions and 10 deletions

View File

@@ -27,8 +27,8 @@ def sign_in():
redirect_url = request.args.get("next")
# TODO this is not the right test to do to find test users
if os.getenv("NOTIFY_E2E_TEST_EMAIL") == "ken.kehl@fedramp.gov":
user = user_api_client.get_user_by_email("ken.kehl@fedramp.gov")
if os.getenv("NOTIFY_E2E_TEST_EMAIL"):
user = user_api_client.get_user_by_email(os.getenv("NOTIFY_E2E_TEST_EMAIL"))
activate_user(user["id"])
return redirect(url_for("main.show_accounts_or_dashboard", next=redirect_url))