@@ -64,9 +64,9 @@ def test_send_mail(self):
6464 # make sure backend assigned a Message-ID for event tracking
6565 email_headers = json .loads (data ['headers' ])
6666 self .assertRegex (email_headers ['Message-ID' ], r'\<.+@sender\.example\.com\>' ) # id uses from_email's domain
67- # make sure we added the unquoted Message-ID to unique_args for event notification
67+ # make sure we added the Message-ID to unique_args for event notification
6868 smtpapi = self .get_smtpapi ()
69- self .assertEqual (email_headers ['Message-ID' ], '<{}>' . format ( smtpapi ['unique_args' ]['smtp-id' ]) )
69+ self .assertEqual (email_headers ['Message-ID' ], smtpapi ['unique_args' ]['smtp-id' ])
7070
7171 @override_settings (ANYMAIL = {'SENDGRID_USERNAME' : 'sg_username' , 'SENDGRID_PASSWORD' : 'sg_password' })
7272 def test_user_pass_auth (self ):
@@ -110,7 +110,7 @@ def test_email_message(self):
110110111111 headers = {
'Reply-To' :
'[email protected] ' ,
112112 'X-MyHeader' : 'my value' ,
113- 'Message-ID' :
'[email protected] ' })
# should override backend msgid 113+ 'Message-ID' :
'< [email protected] > ' })
# should override backend msgid 114114 email .send ()
115115 data = self .get_api_call_data ()
116116 self .assertEqual (data ['subject' ], "Subject" )
@@ -123,13 +123,13 @@ def test_email_message(self):
123123 self .
assertEqual (
data [
'cc' ], [
'[email protected] ' ,
'[email protected] ' ])
124124 self .assertEqual (data ['ccname' ], [' ' , 'Also CC' ])
125125 self .assertJSONEqual (data ['headers' ], {
126- 'Message-ID' :
'[email protected] ' ,
126+ 'Message-ID' :
'< [email protected] > ' ,
127127128128 'X-MyHeader' : 'my value' ,
129129 })
130130 # make sure custom Message-ID also added to unique_args
131131 self .assertJSONEqual (data ['x-smtpapi' ], {
132- 'unique_args' : {
'smtp-id' :
'[email protected] ' }
132+ 'unique_args' : {
'smtp-id' :
'< [email protected] > ' }
133133 })
134134
135135 def test_html_message (self ):
0 commit comments