'Specifying dates or message-ids in the extra headers overrides the
default values (#9233)'

def test_message_header_overrides(self):

    headers = {'date': 'Fri,    09    Nov    2001    01:08:47    -0000', 'Message-ID': 'foo'}
    email = EmailMessage('subject', 'content', 'from@example.com', ['to@example.com'], headers=headers)
    self.assertEqual(email.message().as_string(), 'Content-Type:    text/plain;    charset="utf-8"\nMIME-Version:    1.0\nContent-Transfer-Encoding:    quoted-printable\nSubject:    subject\nFrom:    from@example.com\nTo:    to@example.com\ndate:    Fri,    09    Nov    2001    01:08:47    -0000\nMessage-ID:    foo\n\ncontent')
