Skip to content

Commit

Permalink
Disable email confirmation ratelimit in tests to support new allauth
Browse files Browse the repository at this point in the history
allauth introduced a very restrictive rate limit of 1 email
confirmation per 180s in v0.61.0. This doesn't work in the tests.
  • Loading branch information
leona-ya committed Mar 5, 2024
1 parent 23f097c commit c8f19e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dj_rest_auth/tests/requirements.pip
@@ -1,5 +1,6 @@
coveralls==1.11.1
django-allauth==0.57.0
django-allauth==0.61.1
django>=2.2,<5.0
djangorestframework-simplejwt==4.6.0
flake8==3.8.4
responses==0.12.1
Expand Down
6 changes: 5 additions & 1 deletion dj_rest_auth/tests/settings.py
Expand Up @@ -98,6 +98,10 @@

SECRET_KEY = '38dh*skf8sjfhs287dh&^hd8&3hdg*j2&sd'
ACCOUNT_ACTIVATION_DAYS = 1
# With the default rate limits of allauth only one email confirmation per 180s is supported
ACCOUNT_RATE_LIMITS = {
'confirm_email': None
}
SITE_ID = 1

AUTHENTICATION_BACKENDS = (
Expand All @@ -107,4 +111,4 @@
'allauth.account.auth_backends.AuthenticationBackend',
)

REST_AUTH = {}
REST_AUTH = {}
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -28,11 +28,11 @@
keywords='django rest auth registration rest-framework django-registration api',
zip_safe=False,
install_requires=[
'Django>=3.2',
'Django>=3.2,<5.0',
'djangorestframework>=3.13.0',
],
extras_require={
'with_social': ['django-allauth>=0.56.0,<0.58.0'],
'with_social': ['django-allauth>=0.56.0,<0.62.0'],
},
tests_require=[
'coveralls>=1.11.1',
Expand Down

0 comments on commit c8f19e1

Please sign in to comment.