summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/mail/tests.py9
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()