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-06-14 14:27:40 +0200 |
| commit | 06f0141691c65e6cd625baefae3d600e684c0b37 (patch) | |
| tree | 49ec82554dd6784b15b5ddbe9f2fef23a9d9ea51 | |
| parent | 48382a2ff63a974f92bf5c959885947211e3642c (diff) | |
[5.1.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 9e55398d60..4db752df59 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 @@ -822,13 +821,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() |
