diff --git a/app/config.py b/app/config.py index a82c9a1ab..1d20794ed 100644 --- a/app/config.py +++ b/app/config.py @@ -183,6 +183,16 @@ class E2ETest(Staging): "notify-admin-logo-upload-bucket-staging" ) + API_HOST_NAME = "http://localhost:6011" # nosec B105 - only used in development + # credential overrides + DANGEROUS_SALT = "development-notify-salt" + SECRET_KEY = "dev-notify-secret-key" # nosec B105 - only used in development + # ADMIN_CLIENT_USER_NAME is called ADMIN_CLIENT_ID in api repo, they should match + ADMIN_CLIENT_USER_NAME = "notify-admin" + ADMIN_CLIENT_SECRET = ( + "dev-notify-secret-key" # nosec B105 - only used in development + ) + class Demo(Staging): HEADER_COLOUR = "#6F72AF" # $mauve diff --git a/tests/end_to_end/conftest.py b/tests/end_to_end/conftest.py index 362a46047..fa1d62076 100644 --- a/tests/end_to_end/conftest.py +++ b/tests/end_to_end/conftest.py @@ -1,15 +1,14 @@ import datetime import os - from contextlib import contextmanager -from flask import Flask import pytest from axe_core_python.sync_playwright import Axe +from flask import Flask, current_app from app import create_app -from app.notify_client.user_api_client import user_api_client from app.notify_client.service_api_client import service_api_client +from app.notify_client.user_api_client import user_api_client E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI") @@ -45,12 +44,14 @@ def check_axe_report(page): "moderate", ], f"Accessibility violation: {violation}" + @pytest.fixture def notify_admin_e2e(): os.environ["NOTIFY_ENVIRONMENT"] = "e2etest" application = Flask("app") create_app(application) + return application @@ -69,10 +70,10 @@ def default_service(browser, notify_admin_e2e): service = service_api_client.create_service( service_name, "federal", - os.environ["DEFAULT_SERVICE_LIMIT"], + current_app.config["DEFAULT_SERVICE_LIMIT"], True, - default_user.id, - default_user.email_address, + default_user["id"], + default_user["email_address"], ) print("OK I GOT HERE LETS GO!!!")