mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
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.
This commit is contained in:
parent
44170a34fb
commit
81bcbf7fd3
1 changed files with 3 additions and 3 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue