File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1980,9 +1980,6 @@ def mock_incoming_msg(
19801980 zeroconf .handle_response (
19811981 mock_incoming_msg (r .ServiceStateChange .Added , service_types [1 ], service_names [1 ], 120 )
19821982 )
1983- zeroconf .handle_response (
1984- mock_incoming_msg (r .ServiceStateChange .Added , service_types [2 ], service_names [2 ], 120 )
1985- )
19861983
19871984 called_with_refresh_time_check = False
19881985
@@ -1995,6 +1992,12 @@ def _mock_get_expiration_time(self, percent):
19951992
19961993 # Set an expire time that will force a refresh
19971994 with unittest .mock .patch ("zeroconf.DNSRecord.get_expiration_time" , new = _mock_get_expiration_time ):
1995+ zeroconf .handle_response (
1996+ mock_incoming_msg (r .ServiceStateChange .Added , service_types [0 ], service_names [0 ], 120 )
1997+ )
1998+ # Add the last record after updating the first one
1999+ # to ensure the service_add_event only gets set
2000+ # after the update
19982001 zeroconf .handle_response (
19992002 mock_incoming_msg (r .ServiceStateChange .Added , service_types [2 ], service_names [2 ], 120 )
20002003 )
You can’t perform that action at this time.
0 commit comments