1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add fixtures for Axis rtsp client and adapt tests to use them (#47901)

* Add a fixture for rtsp client and adapt tests to use it

* Better fixtures for RTSP events and signals
This commit is contained in:
Robert Svensson
2021-04-09 10:56:53 +02:00
committed by GitHub
parent e7e53b879e
commit 31ae121645
7 changed files with 230 additions and 90 deletions

View File

@@ -263,9 +263,7 @@ class AxisNetworkDevice:
def disconnect_from_stream(self):
"""Stop stream."""
if self.api.stream.state != STATE_STOPPED:
self.api.stream.connection_status_callback.remove(
self.async_connection_status_callback
)
self.api.stream.connection_status_callback.clear()
self.api.stream.stop()
async def shutdown(self, event):