forked from jazzband/django-configurations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed jazzband#336 -- Update Python and Django versions
- Loading branch information
Showing
7 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
import os | ||
from contextlib import contextmanager | ||
|
||
from django import VERSION as DJANGO_VERSION | ||
from django.test import TestCase | ||
from django.core.exceptions import ImproperlyConfigured | ||
|
||
|
@@ -411,6 +412,7 @@ def test_email_url_value(self): | |
'EMAIL_HOST_PASSWORD': 'password', | ||
'EMAIL_HOST_USER': '[email protected]', | ||
'EMAIL_PORT': 587, | ||
'EMAIL_TIMEOUT': None, | ||
'EMAIL_USE_SSL': False, | ||
'EMAIL_USE_TLS': True}) | ||
with env(EMAIL_URL='console://'): | ||
|
@@ -421,6 +423,7 @@ def test_email_url_value(self): | |
'EMAIL_HOST_PASSWORD': None, | ||
'EMAIL_HOST_USER': None, | ||
'EMAIL_PORT': None, | ||
'EMAIL_TIMEOUT': None, | ||
'EMAIL_USE_SSL': False, | ||
'EMAIL_USE_TLS': False}) | ||
with env(EMAIL_URL='smtps://[email protected]:[email protected]:wrong'): # noqa: E501 | ||
|
@@ -429,7 +432,7 @@ def test_email_url_value(self): | |
def test_cache_url_value(self): | ||
cache_setting = { | ||
'default': { | ||
'BACKEND': 'django_redis.cache.RedisCache', | ||
'BACKEND': 'django_redis.cache.RedisCache' if DJANGO_VERSION < (4,) else 'django.core.cache.backends.redis.RedisCache', # noqa: E501 | ||
'LOCATION': 'redis://host:6379/1', | ||
} | ||
} | ||
|
@@ -503,6 +506,7 @@ class Target: | |
'EMAIL_HOST_PASSWORD': 'password', | ||
'EMAIL_HOST_USER': '[email protected]', | ||
'EMAIL_PORT': 587, | ||
'EMAIL_TIMEOUT': None, | ||
'EMAIL_USE_SSL': False, | ||
'EMAIL_USE_TLS': True | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters