def test_connection_done(self):
        # pretend we connected
        self.proto._connectionMade()

        self.proto.connectionLost(Failure(ConnectionDone()))

        messages = ' '.join([str(x[1]) for x in self.proto.log.mock_calls])
        self.assertTrue('closed cleanly' in messages)
dataset/ETHPy150Open crossbario/autobahn-python/autobahn/twisted/test/test_protocol.py/ExceptionHandlingTests.test_connection_done/original