Python CSC Electronic Office
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
545 B

def test_welcome_message(cfg, mock_mail_server, mail_srv, simple_user):
base_domain = cfg.get('base_domain')
mail_srv.send_welcome_message_to(simple_user, 'password')
msg = mock_mail_server.messages[0]
assert msg['from'] == f'exec@{base_domain}'
assert msg['to'] == f'{simple_user.uid}@{base_domain}'
# make sure that templating was applied correctly
first_name =[0]
assert f'Hello {first_name}' in msg['content']