mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
This commit is contained in:
@@ -1147,7 +1147,7 @@ class FakeSMTPServer(smtpd.SMTPServer, threading.Thread):
|
||||
self.sink_lock = threading.Lock()
|
||||
|
||||
def process_message(self, peer, mailfrom, rcpttos, data):
|
||||
data = data.encode('utf-8')
|
||||
data = data.encode()
|
||||
m = message_from_bytes(data)
|
||||
maddr = parseaddr(m.get('from'))[1]
|
||||
|
||||
@@ -1419,7 +1419,7 @@ class SMTPBackendTests(BaseEmailBackendTests, SMTPBackendTestsBase):
|
||||
|
||||
self.assertTrue(msg)
|
||||
|
||||
msg = msg.decode('utf-8')
|
||||
msg = msg.decode()
|
||||
# The message only contains CRLF and not combinations of CRLF, LF, and CR.
|
||||
msg = msg.replace('\r\n', '')
|
||||
self.assertNotIn('\r', msg)
|
||||
|
||||
Reference in New Issue
Block a user