Fix flaky UPNP test (#58493)

This commit is contained in:
Erik Montnemery 2021-10-26 22:35:09 +02:00 committed by GitHub
parent 7024a5d7d9
commit 953ad71d22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -52,6 +52,7 @@ class MockDevice:
self._udn = udn
self.traffic_times_polled = 0
self.status_times_polled = 0
self._timestamp = dt.utcnow()
@classmethod
async def async_create_device(cls, hass, ssdp_location) -> "MockDevice":
@ -108,7 +109,7 @@ class MockDevice:
"""Get traffic data."""
self.traffic_times_polled += 1
return {
TIMESTAMP: dt.utcnow(),
TIMESTAMP: self._timestamp,
BYTES_RECEIVED: 0,
BYTES_SENT: 0,
PACKETS_RECEIVED: 0,