コード例 #1
0
    def setUp(self):
        self.responses = {}
        loop = asyncio.get_event_loop()
        blackbird = loop.run_until_complete(get_async_blackbird(create_dummy_port(self.responses), loop))

        # Dummy blackbird that converts async to sync
        class DummyBlackbird():
            def __getattribute__(self, item):
                def f(*args, **kwargs):
                    return loop.run_until_complete(blackbird.__getattribute__(item)(*args, **kwargs))
                return f
        self.blackbird = DummyBlackbird()
コード例 #2
0
    def setUp(self):
        self.responses = {}
        loop = asyncio.get_event_loop()
        xantech = loop.run_until_complete(get_async_xantech(create_dummy_port(self.responses), loop))

        # Dummy xantech that converts async to sync
        class DummyMonoprice():
            def __getattribute__(self, item):
                def f(*args, **kwargs):
                    return loop.run_until_complete(xantech.__getattribute__(item)(*args, **kwargs))
                return f
        self.xantech = DummyMonoprice()
コード例 #3
0
 def setUp(self):
     self.responses = {}
     self.xantech = get_xantech(create_dummy_port(self.responses))
コード例 #4
0
 def setUp(self):
     self.responses = {}
     self.monoprice = get_monoprice(create_dummy_port(self.responses))
コード例 #5
0
 def setUp(self):
     self.responses = {}
     self.blackbird = get_blackbird(create_dummy_port(self.responses))