'If L{smtp.SMTP} receives an empty line, it responds with a 500 error
response code and a message about a syntax error.'

def test_emptyLineSyntaxError(self):

    proto = smtp.SMTP()
    transport = StringTransport()
    proto.makeConnection(transport)
    proto.lineReceived('')
    proto.setTimeout(None)
    out = transport.value().splitlines()
    self.assertEqual(len(out), 2)
    self.assertTrue(out[0].startswith('220'))
    self.assertEqual(out[1], '500    Error:    bad    syntax')
