Speedup Reolink tests by using scope="module" (#125215)

* use scope="module"

* Instead of side_effect = None, use reset_mock(side_efffect=True)

* fix tests
This commit is contained in:
starkillerOG 2024-09-23 12:50:40 +02:00 committed by GitHub
parent a9d12608bd
commit 8ef7cae36d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 101 additions and 12 deletions

View file

@ -52,7 +52,7 @@ def mock_setup_entry() -> Generator[AsyncMock]:
yield mock_setup_entry
@pytest.fixture
@pytest.fixture(scope="module")
def reolink_connect_class() -> Generator[MagicMock]:
"""Mock reolink connection and return both the host_mock and host_mock_class."""
with (