def send_test_mail(self): form = ContactForm({'name': 'Test Case', 'email': '*****@*****.**', 'subject': 'Test subject', 'body': 'Test body'}) # Validate the data so we know it's safe and stored appropiatly, # the assertion is there just to make sure self.assertTrue(form.is_valid()) form.send_mail()