def close(self):
        if not hasattr(self, '__db'):
            return 0
        self.__db.close()
        del self.__db
Sets up a mocked channel, ready for fake bidir communication.
dataset/ETHPy150Open semk/Pytt/pytt/utils.py/Database.close--crossover with--dataset/ETHPy150Open ooici/pyon/pyon/net/test/test_endpoint.py/RecvMockMixin._setup_mock_channel