def test_SMTPUnknownCommand(self):
        """
        Sending an unimplemented command is responded to with a 500.
        """
        s = smtp.SMTP()
        t = StringTransport()
        s.makeConnection(t)
        s.lineReceived(b"DOAGOODTHING")
        s.connectionLost(error.ConnectionDone())
        self.assertIn(b"500 Command not implemented", t.value())

        Sending an unimplemented command is responded to with a 500.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_smtp.py