def test_mail_status(self):
        send_mail('subject', 'message', 'from@example.com', ['to@example.com'],
                  priority=PRIORITY.medium)
        email = Email.objects.latest('id')
        self.assertEqual(email.status, STATUS.queued)

        # Emails sent with "now" priority is sent right away
        send_mail('subject', 'message', 'from@example.com', ['to@example.com'],
                  priority=PRIORITY.now)
        email = Email.objects.latest('id')
        self.assertEqual(email.status, STATUS.sent)
Check that send_mail assigns the right status field to Email instances
dataset/ETHPy150Open ui/django-post_office/post_office/tests/test_utils.py/UtilsTest.test_mail_status