'The console backend can be pointed at an arbitrary stream.'

def test_console_stream_kwarg(self):

    s = StringIO()
    connection = mail.get_connection('django.core.mail.backends.console.EmailBackend', stream=s)
    send_mail('Subject', 'Content', 'from@example.com', ['to@example.com'], connection=connection)
    message = force_bytes(s.getvalue().split((('\n' + ('-' * 79)) + '\n'))[0])
    self.assertMessageHasHeaders(message, {('MIME-Version', '1.0'), ('Content-Type', 'text/plain;    charset="utf-8"'), ('Content-Transfer-Encoding', '7bit'), ('Subject', 'Subject'), ('From', 'from@example.com'), ('To', 'to@example.com')})
    self.assertIn('\nDate:    ', message)
