return mock

def setUp(self):
    logging.disable(logging.CRITICAL)
self.patches = []
self.session = self._patchObject('components.ApplicationAPI')
self.database = self._patchObject('txpostgres.txpostgres.Connection')

def tearDown(self):
    for patcher in self.patches:
        patcher.stop()
How to do unit test on Autobahn applications using Twisted Trial?