From 81bcbf7fd35b4a800c581b422cf9d632f4f68272 Mon Sep 17 00:00:00 2001 From: Fleur Dragan Date: Tue, 16 Aug 2022 15:58:48 -0500 Subject: [PATCH] From https://docs.djangoproject.com/en/4.0/releases/3.0/#django-utils-encoding-force-text-and-smart-text: 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. --- django_mailbox/tests/test_process_email.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/django_mailbox/tests/test_process_email.py b/django_mailbox/tests/test_process_email.py index f00e21b..a3d2490 100644 --- a/django_mailbox/tests/test_process_email.py +++ b/django_mailbox/tests/test_process_email.py @@ -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')