mirror of
https://github.com/django/django.git
synced 2024-11-25 07:59:34 +01:00
Refs #33173 -- Fixed MailTests.test_backend_arg() on Windows and Python 3.11+.
This commit is contained in:
parent
9ac3ef59f9
commit
fac3dd7f39
@ -15,6 +15,7 @@ PY37 = sys.version_info >= (3, 7)
|
||||
PY38 = sys.version_info >= (3, 8)
|
||||
PY39 = sys.version_info >= (3, 9)
|
||||
PY310 = sys.version_info >= (3, 10)
|
||||
PY311 = sys.version_info >= (3, 11)
|
||||
|
||||
|
||||
def get_version(version=None):
|
||||
|
@ -29,6 +29,7 @@ from django.core.mail.message import BadHeaderError, sanitize_address
|
||||
from django.test import SimpleTestCase, override_settings
|
||||
from django.test.utils import requires_tz_support
|
||||
from django.utils.translation import gettext_lazy
|
||||
from django.utils.version import PY311
|
||||
|
||||
try:
|
||||
from aiosmtpd.controller import Controller
|
||||
@ -790,7 +791,7 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
|
||||
filebased.EmailBackend,
|
||||
)
|
||||
|
||||
if sys.platform == "win32":
|
||||
if sys.platform == "win32" and not PY311:
|
||||
msg = (
|
||||
"_getfullpathname: path should be string, bytes or os.PathLike, not "
|
||||
"object"
|
||||
|
Loading…
Reference in New Issue
Block a user