Adjusted expected exception message for Windows.
Test failure introduced in
Windows uses a different error message when a non-path is passed to
os.path functions.
@@ -569,6 +569,9 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
filebased.EmailBackend
)
+ if sys.platform == 'win32':
+ msg = '_getfullpathname: path should be string, bytes or os.PathLike, not object'
+ else:
msg = 'expected str, bytes or os.PathLike object, not object'
with self.assertRaisesMessage(TypeError, msg):
mail.get_connection('django.core.mail.backends.filebased.EmailBackend', file_path=object())
