From c9d2f890929397626f9c75d95f911858b870b0c3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 23 Oct 2023 14:56:58 +0200 Subject: [PATCH] add allauth middleware to test settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The django-allauth package since 0.56¹ requires setting up its middleware in settings. The same issue² was fixed in dj-rest-auth 5.0.2. [1] https://github.com/pennersr/django-allauth/blob/main/ChangeLog.rst#backwards-incompatible-changes-1 [2] https://github.com/iMerica/dj-rest-auth/pull/561 --- requirements/optionals.txt | 4 ++-- tests/conftest.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements/optionals.txt b/requirements/optionals.txt index 7ce28e34..d64df878 100644 --- a/requirements/optionals.txt +++ b/requirements/optionals.txt @@ -1,6 +1,6 @@ -django-allauth<0.55.0 # breaking change breaking dj-rest-auth +django-allauth>=0.56.0 drf-jwt>=0.13.0 -dj-rest-auth>=1.0.0 +dj-rest-auth>=5.0.2 djangorestframework-simplejwt>=4.4.0 django-polymorphic>=2.1 django-rest-polymorphic>=0.1.8 diff --git a/tests/conftest.py b/tests/conftest.py index c46e4892..c4d53a89 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -70,6 +70,7 @@ def pytest_configure(config): 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.locale.LocaleMiddleware', + 'allauth.account.middleware.AccountMiddleware', ), INSTALLED_APPS=( 'django.contrib.auth',