'Test that 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)
    self.assertTrue(s.getvalue().startswith('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:    '))
