diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-11-06 05:34:44 -0800 |
---|---|---|
committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-11-06 14:34:44 +0100 |
commit | e3c2fae4cd549a6aeefcf7b217ba4b173489e18c (patch) | |
tree | b96b037be405dc7042936d9319aa7098ce2d8b21 /tests/mail | |
parent | 4c45b627f8c05aaa60f0989f5a41aefe8d107b57 (diff) | |
download | django-e3c2fae4cd549a6aeefcf7b217ba4b173489e18c.tar.gz |
Adjusted expected exception message for Windows.
Test failure introduced in fbbff7f80870bc3e98de4a2fc9cd853949842fd0.
Windows uses a different error message when a non-path is passed to
os.path functions.
Diffstat (limited to 'tests/mail')
-rw-r--r-- | tests/mail/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 567a012b8d..84aa8dc498 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -569,7 +569,10 @@ class MailTests(HeadersCheckMixin, SimpleTestCase): filebased.EmailBackend ) - msg = 'expected str, bytes or os.PathLike object, not object' + 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()) self.assertIsInstance(mail.get_connection(), locmem.EmailBackend) |