From beab132ad9fbb6bd5ef245b477e119fa45c85d9d Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Wed, 20 Nov 2024 14:00:09 +0530 Subject: [PATCH] fix: website tests --- tests/frontendIntegration/django3x/mysite/asgi.py | 6 ++++++ tests/frontendIntegration/drf_async/mysite/asgi.py | 6 ++++++ tests/frontendIntegration/drf_sync/mysite/wsgi.py | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/tests/frontendIntegration/django3x/mysite/asgi.py b/tests/frontendIntegration/django3x/mysite/asgi.py index 38f185c23..6bd612f40 100644 --- a/tests/frontendIntegration/django3x/mysite/asgi.py +++ b/tests/frontendIntegration/django3x/mysite/asgi.py @@ -13,4 +13,10 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") +if True: + # to help middleware function with uvicorn (to ensure supertokens init is called) + from polls.views import config + + config(True, False, None) + application = get_asgi_application() diff --git a/tests/frontendIntegration/drf_async/mysite/asgi.py b/tests/frontendIntegration/drf_async/mysite/asgi.py index 38f185c23..6bd612f40 100644 --- a/tests/frontendIntegration/drf_async/mysite/asgi.py +++ b/tests/frontendIntegration/drf_async/mysite/asgi.py @@ -13,4 +13,10 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") +if True: + # to help middleware function with uvicorn (to ensure supertokens init is called) + from polls.views import config + + config(True, False, None) + application = get_asgi_application() diff --git a/tests/frontendIntegration/drf_sync/mysite/wsgi.py b/tests/frontendIntegration/drf_sync/mysite/wsgi.py index 8b00faa3e..53bc8977f 100644 --- a/tests/frontendIntegration/drf_sync/mysite/wsgi.py +++ b/tests/frontendIntegration/drf_sync/mysite/wsgi.py @@ -13,4 +13,10 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") +if True: + # to help middleware function with uvicorn (to ensure supertokens init is called) + from polls.views import config + + config(True, False, None) + application = get_wsgi_application()