diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-06-14 12:02:39 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-07-22 09:05:44 +0200 |
| commit | 4609d53adbe15ab22c80ebec5c084c22d0650771 (patch) | |
| tree | 6542e730009001e99789f69289793c074bce40f9 | |
| parent | 83ec18b1749ee1ca9a2b3a0ded615465a95b6cb3 (diff) | |
[5.0.x] Fixed mail.tests.MailTests.test_backend_arg() test on Python 3.13+.
There is no point in asserting Python error messages.
Backport of 4ee68bb4f50dbe842461f8f340bb1633fddd4a53 from main.
| -rw-r--r-- | tests/mail/tests.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 8d51c287b3..b586d481af 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -29,7 +29,6 @@ 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 @@ -791,13 +790,7 @@ class MailTests(HeadersCheckMixin, SimpleTestCase): filebased.EmailBackend, ) - if sys.platform == "win32" and not PY311: - msg = ( - "_getfullpathname: path should be string, bytes or os.PathLike, not " - "object" - ) - else: - msg = "expected str, bytes or os.PathLike object, not object" + msg = " not object" with self.assertRaisesMessage(TypeError, msg): mail.get_connection( "django.core.mail.backends.filebased.EmailBackend", file_path=object() |
