diff options
| author | Tim Graham <timograham@gmail.com> | 2017-01-20 08:01:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-20 08:01:02 -0500 |
| commit | 4e729feaa647547f25debb1cb63dec989dc41a20 (patch) | |
| tree | 7c7a38c5961bf4daf98a8cb47dc74c769563ffcf /tests/mail | |
| parent | ec4c1d6717da7a9d09d5b3ce84cccac819bb592c (diff) | |
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
Diffstat (limited to 'tests/mail')
| -rw-r--r-- | tests/mail/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 8ba4d64423..8019f3ccf8 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -25,7 +25,6 @@ from django.core.mail.backends import console, dummy, filebased, locmem, smtp 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._os import upath from django.utils.encoding import force_bytes, force_text from django.utils.translation import ugettext_lazy @@ -411,7 +410,7 @@ class MailTests(HeadersCheckMixin, SimpleTestCase): email = EmailMessage('subject', 'body', 'from@example.com', ['to@example.com']) self.assertEqual(mimetypes.guess_type(basename)[0], real_mimetype) self.assertEqual(email.attachments, []) - file_path = os.path.join(os.path.dirname(upath(__file__)), 'attachments', basename) + file_path = os.path.join(os.path.dirname(__file__), 'attachments', basename) email.attach_file(file_path, mimetype=mimetype) self.assertEqual(len(email.attachments), 1) self.assertIn(basename, email.attachments[0]) |
