replacing send_mail with EmailMessage in test view