'Test that a preset message-id is saved correctly'

def test_save_existing_message_id(self):

    with self.settings(MAILER_EMAIL_BACKEND=u'mailer.tests.TestMailerEmailBackend'):
        make_message(subject=u'Subject', body=u'Body', from_email=u'sender@example.com', to=[u'recipient@example.com'], priority=PRIORITY_MEDIUM, headers={u'message-id': u'foo'}).save()
        engine.send_all()
        m = MessageLog.objects.get()
        self.assertEqual(m.email.extra_headers[u'message-id'], u'foo')
        self.assertEqual(m.message_id, u'foo')
