Fix task_mailer tests
Merge branch 'fix_task_mailer_tests' into 'master'

Fix task mailer tests

See merge request !372