commit: dff7b951811dde55af59852b78639b458e0539db
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 07:58:56 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 08:17:10 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dff7b951
dev-python/django-configurations: Fix failing tests
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../django-configurations-2.3.2.ebuild | 4 ++
.../files/django-configurations-2.3.2-test.patch | 45 ++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git
a/dev-python/django-configurations/django-configurations-2.3.2.ebuild
b/dev-python/django-configurations/django-configurations-2.3.2.ebuild
index b8bbfbdabaea..00b555a25889 100644
--- a/dev-python/django-configurations/django-configurations-2.3.2.ebuild
+++ b/dev-python/django-configurations/django-configurations-2.3.2.ebuild
@@ -36,6 +36,10 @@ BDEPEND="
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+PATCHES=(
+ "${FILESDIR}"/${P}-test.patch
+)
+
python_test() {
local -x DJANGO_SETTINGS_MODULE=tests.settings.main
local -x DJANGO_CONFIGURATION=Test
diff --git
a/dev-python/django-configurations/files/django-configurations-2.3.2-test.patch
b/dev-python/django-configurations/files/django-configurations-2.3.2-test.patch
new file mode 100644
index 000000000000..19787102920a
--- /dev/null
+++
b/dev-python/django-configurations/files/django-configurations-2.3.2-test.patch
@@ -0,0 +1,45 @@
+diff --git a/tests/test_values.py b/tests/test_values.py
+index 2547e50..2f1170b 100644
+--- a/tests/test_values.py
++++ b/tests/test_values.py
+@@ -2,6 +2,7 @@ import decimal
+ 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 @@ class ValueTests(TestCase):
+ '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 @@ class ValueTests(TestCase):
+ '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 @@ class ValueTests(TestCase):
+ def test_cache_url_value(self):
+ cache_setting = {
+ 'default': {
+- 'BACKEND': 'django_redis.cache.RedisCache',
++ 'BACKEND': 'django_redis.cache.RedisCache' if
DJANGO_VERSION[0] < 4 else 'django.core.cache.backends.redis.RedisCache',
+ 'LOCATION': 'redis://host:6379/1',
+ }
+ }
+@@ -503,6 +506,7 @@ class ValueTests(TestCase):
+ 'EMAIL_HOST_PASSWORD': 'password',
+ 'EMAIL_HOST_USER': '[email protected]',
+ 'EMAIL_PORT': 587,
++ 'EMAIL_TIMEOUT': None,
+ 'EMAIL_USE_SSL': False,
+ 'EMAIL_USE_TLS': True
+ })