async def mockrequest(req, nwk, epid, tries=None, delay=None): sd = types.SimpleDescriptor() sd.endpoint = 1 sd.profile = profile sd.device_type = 0xff sd.input_clusters = [5] sd.output_clusters = [6] return [0, None, sd]
async def mockrequest(nwk, epid, tries=None, delay=None): sd = types.SimpleDescriptor() sd.endpoint = 2 return [131, None, sd]
await app._change_network_state(deconz_api.NetworkState.CONNECTED, timeout=0.01) if support_watchdog: assert cancel_mock.call_count == 1 assert app._reset_watchdog_task is not old_watchdog_task else: assert cancel_mock.call_count == 0 assert app._reset_watchdog_task is old_watchdog_task ENDPOINT = zdo_t.SimpleDescriptor( endpoint=None, profile=1, device_type=2, device_version=3, input_clusters=[4], output_clusters=[5], ) @pytest.mark.parametrize( "descriptor, slots, target_slot", [ (ENDPOINT.replace(endpoint=1), { 0: ENDPOINT.replace(endpoint=2), 1: None }, 1), # Prefer the endpoint with the same ID ( ENDPOINT.replace(endpoint=1),