Skip to content

Commit

Permalink
Update Z-Wave JS Client
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffy2 committed Dec 7, 2024
1 parent fc88747 commit 24166c7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,24 @@ async def mock_zwavejs_get_usercodes():
yield mock_usercodes


@pytest.fixture
async def mock_zwavejs_clear_usercode():
"""Fixture to mock clear_usercode."""
with patch(
"zwave_js_server.util.lock.clear_usercode", return_value=None
) as mock_usercodes:
yield mock_usercodes


@pytest.fixture
async def mock_zwavejs_set_usercode():
"""Fixture to mock set_usercode."""
with patch(
"zwave_js_server.util.lock.set_usercode", return_value=None
) as mock_usercodes:
yield mock_usercodes


@pytest.fixture
async def mock_using_zwavejs():
"""Fixture to mock using_zwavejs in helpers"""
Expand Down
2 changes: 2 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ async def test_setup_entry_alt_slots(
lock_kwikset_910,
integration,
mock_zwavejs_get_usercodes,
mock_zwavejs_clear_usercode,
mock_zwavejs_set_usercode
mock_using_zwavejs,
caplog,
):
Expand Down

0 comments on commit 24166c7

Please sign in to comment.