Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions zeroconf/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1980,9 +1980,6 @@ def mock_incoming_msg(
zeroconf.handle_response(
mock_incoming_msg(r.ServiceStateChange.Added, service_types[1], service_names[1], 120)
)
zeroconf.handle_response(
mock_incoming_msg(r.ServiceStateChange.Added, service_types[2], service_names[2], 120)
)

called_with_refresh_time_check = False

Expand All @@ -1995,6 +1992,12 @@ def _mock_get_expiration_time(self, percent):

# Set an expire time that will force a refresh
with unittest.mock.patch("zeroconf.DNSRecord.get_expiration_time", new=_mock_get_expiration_time):
zeroconf.handle_response(
mock_incoming_msg(r.ServiceStateChange.Added, service_types[0], service_names[0], 120)
)
# Add the last record after updating the first one
# to ensure the service_add_event only gets set
# after the update
zeroconf.handle_response(
mock_incoming_msg(r.ServiceStateChange.Added, service_types[2], service_names[2], 120)
)
Expand Down