def setup_connection(): self.zigate.connection = transport.FakeTransport() self.zigate.connection.add_auto_response( 0x0009, 0x8009, unhexlify(b'00000123456789abcdef123400000000000000000b')) self.zigate.connection.add_auto_response( 0x0024, 0x8024, unhexlify(b'001234fedcba98765432100b'))
def setUp(self): core.WAIT_TIMEOUT = 2 * core.SLEEP_INTERVAL # reduce timeout during test self.zigate = ZiGate(auto_start=False) self.zigate.connection = transport.FakeTransport() self.test_dir = tempfile.mkdtemp()