Aaron Bach b0df223f5a
Bump aioguardian (#37188)
* Bump aioguardian

* Fix tests
2020-06-27 23:16:42 -06:00

18 lines
586 B
Python

"""Define fixtures for Elexa Guardian tests."""
from asynctest import patch
import pytest
@pytest.fixture()
def ping_client():
"""Define a patched client that returns a successful ping response."""
with patch(
"homeassistant.components.guardian.async_setup_entry", return_value=True
), patch("aioguardian.client.Client.connect"), patch(
"aioguardian.commands.system.SystemCommands.ping",
return_value={"command": 0, "status": "ok", "data": {"uid": "ABCDEF123456"}},
), patch(
"aioguardian.client.Client.disconnect"
):
yield