def test_emptyLineSyntaxError(self):
        """
        If L{smtp.SMTP} receives an empty line, it responds with a 500 error
        response code and a message about a syntax error.
        """
        proto = smtp.SMTP()
        transport = StringTransport()
        proto.makeConnection(transport)
        proto.lineReceived(b'')
        proto.setTimeout(None)

        out = transport.value().splitlines()
        self.assertEqual(len(out), 2)
        self.assertTrue(out[0].startswith(b'220'))
        self.assertEqual(out[1], b"500 Error: bad syntax")

        If L{smtp.SMTP} receives an empty line, it responds with a 500 error
        response code and a message about a syntax error.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_smtp.py