1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00
The smart_text() and force_text() aliases (since Django 2.0) of smart_str() and force_str() are deprecated. Ignore this deprecation if your code supports Python 2 as the behavior of smart_str() and force_str() is different there.
This commit is contained in:
Fleur Dragan 2022-08-16 15:58:48 -05:00
parent 44170a34fb
commit 81bcbf7fd3

View file

@ -8,7 +8,7 @@ from django_mailbox.models import Mailbox, Message
from django_mailbox.utils import convert_header_to_unicode
from django_mailbox import utils
from django_mailbox.tests.base import EmailMessageTestCase
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from django.core.mail import EmailMessage
__all__ = ['TestProcessEmail']
@ -366,12 +366,12 @@ class TestProcessEmail(EmailMessageTestCase):
email_object = self._get_email_object(
'message_with_long_content.eml',
)
size = len(force_text(email_object.as_string()))
size = len(force_str(email_object.as_string()))
msg = self.mailbox.process_incoming_message(email_object)
self.assertEqual(size,
len(force_text(msg.get_email_object().as_string())))
len(force_str(msg.get_email_object().as_string())))
def test_message_saved(self):
message = self._get_email_object('generic_message.eml')