mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue