@@ -67,7 +67,7 @@ def set_bot(cls):
67
67
"attachments" : yaml .load (attachments ),
68
68
"smtp_host" : "localhost" ,
69
69
"body" : "URL: {{ event['source.url'] }}" ,
70
- "subject" : "{{ event['malware.name'] }} on {{ event['destination.fqdn'] }}" ,
70
+ "subject" : "{{ event['malware.name'] }} on \u00e0 {{ event['destination.fqdn'] }}" ,
71
71
"mail_from" : "myself" ,
72
72
"mail_to" : "you,yourself"
73
73
}
@@ -96,7 +96,7 @@ def test_event(self):
96
96
unittest .mock .patch ('smtplib.SMTP.close' ):
97
97
self .run_bot ()
98
98
99
- self .assertEqual (SENT_MESSAGE [0 ]["Subject" ], "test-malware on destination.example.com" )
99
+ self .assertEqual (SENT_MESSAGE [0 ]["Subject" ], "test-malware on \u00e0 destination.example.com" )
100
100
self .assertEqual (SENT_MESSAGE [0 ]["From" ], "myself" )
101
101
self .assertEqual (SENT_MESSAGE [0 ]["To" ], "you, yourself" )
102
102
self .assertEqual (SENT_MESSAGE [0 ].get_payload ()[0 ].get_payload (), "URL: http://example.com/\n " )
@@ -124,7 +124,7 @@ def test_multiple_recipients_event(self):
124
124
unittest .mock .patch ("smtplib.SMTP.close" ):
125
125
self .run_bot (parameters = {"mail_to" : "{{ event['source.abuse_contact'] }}" })
126
126
127
- self .assertEqual (SENT_MESSAGE [0 ]["Subject" ], "test-malware on destination.example.com" )
127
+ self .assertEqual (SENT_MESSAGE [0 ]["Subject" ], "test-malware on \u00e0 destination.example.com" )
128
128
self .assertEqual (SENT_MESSAGE [0 ]["From" ], "myself" )
129
129
self .assertEqual (SENT_MESSAGE [0 ]["To" ], ", " .join (EVENT1 ["source.abuse_contact" ].split ("," )))
130
130
self .
assertEqual ({
"from_addr" :
"myself" ,
"to_addrs" : [
"[email protected] " ,
"[email protected] " ]},
0 commit comments