'Check the signal receiver and email sending.'

def test_email_sent_with_site(self):

    UserTaskArtifact.objects.create(status=self.status, name=u'BASE_URL', url=u'https://test.edx.org/')
    user_task_stopped.send(sender=UserTaskStatus, status=self.status)
    subject = u'{platform_name}    {studio_name}:    Task    Status    Update'.format(platform_name=settings.PLATFORM_NAME, studio_name=settings.STUDIO_NAME)
    body_fragments = [u'Your    {task_name}    task    has    completed    with    the    status'.format(task_name=self.status.name.lower()), u'https://test.edx.org/', reverse(u'usertaskstatus-detail', args=[self.status.uuid])]
    self.assertEqual(len(mail.outbox), 1)
    msg = mail.outbox[0]
    self.assertEqual(msg.subject, subject)
    for fragment in body_fragments:
        self.assertIn(fragment, msg.body)
