'send_messages() shouldn\'t try to send messages if open() raises an
exception after initializing the connection.'

def test_send_messages_after_open_failed(self):

    backend = smtp.EmailBackend()
    backend.connection = True
    backend.open = (lambda : None)
    email = EmailMessage('Subject', 'Content', 'from@example.com', ['to@example.com'])
    self.assertEqual(backend.send_messages([email]), None)
