mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Adjusted expected exception message for Windows.
Test failure introduced in fbbff7f808
.
Windows uses a different error message when a non-path is passed to
os.path functions.
This commit is contained in:
parent
4c45b627f8
commit
e3c2fae4cd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user