- self.emailsent_set.create(
- hash_value=recipient.hash_value,
- email=recipient.email,
- subject=subject,
- body=body,
- )
+ if not test:
+ self.emailsent_set.create(
+ hash_value=recipient.hash_value,
+ email=recipient.email,
+ subject=subject,
+ body=body,
+ )
+
+ def send_test_email(self, email):
+ state = self.get_state()()
+ recipient = state.get_example_recipient(email)
+ self.send(recipient, test=True)