@@ -157,7 +157,11 @@ def test_send_mail_valid_email(client, configured_smtpd):
157
157
("" , "other_person" , "other@mail.com" ),
158
158
("us_person" , "" , "other@mail.com" ),
159
159
])
160
- def test_send_mail_bad_invitation (client , configured_smtpd , sender_name , recipient_name , recipient_mail ):
160
+ def test_send_mail_bad_invitation (client ,
161
+ configured_smtpd ,
162
+ sender_name ,
163
+ recipient_name ,
164
+ recipient_mail ):
161
165
with mail .record_messages () as outbox :
162
166
response = client .post ("/email/invitation/" , json = {
163
167
"sender_name" : sender_name ,
@@ -176,16 +180,26 @@ def test_send_mail_bad_invitation(client, configured_smtpd, sender_name, recipie
176
180
("us_person" , "" , "other@mail.com" ),
177
181
("us_person" , "other_person" , "other#mail.com" ),
178
182
])
179
- def test_send_mail_bad_invitation_internal (client , configured_smtpd , sender_name , recipient_name , recipient_mail ):
183
+ def test_send_mail_bad_invitation_internal (client ,
184
+ configured_smtpd ,
185
+ sender_name ,
186
+ recipient_name ,
187
+ recipient_mail ):
180
188
background_task = BackgroundTasks ()
181
- assert not send_email_invitation (sender_name , recipient_name , recipient_mail , background_task )
189
+ assert not send_email_invitation (sender_name ,
190
+ recipient_name ,
191
+ recipient_mail ,
192
+ background_task )
182
193
183
194
184
195
@pytest .mark .parametrize ("recipient_mail,file_path" , [
185
196
("other@mail.com" , "non_existing_file" ),
186
197
("other#mail.com" , __file__ ),
187
198
])
188
- def test_send_mail_bad_file_internal (client , configured_smtpd , recipient_mail , file_path ):
199
+ def test_send_mail_bad_file_internal (client ,
200
+ configured_smtpd ,
201
+ recipient_mail ,
202
+ file_path ):
189
203
background_task = BackgroundTasks ()
190
204
assert not send_email_file (file_path , recipient_mail , background_task )
191
205
0 commit comments