Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Nov 16, 2023
1 parent 3ffeb90 commit 4463803
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,12 @@ async def test_connect_failure(app):


async def test_disconnect(app):
reset_watchdog_task = app._reset_watchdog_task = MagicMock()
api_close = app._api.close = MagicMock()

await app.disconnect()

assert app._api is None
assert app._reset_watchdog_task is None

assert api_close.call_count == 1
assert reset_watchdog_task.cancel.call_count == 1


async def test_disconnect_no_api(app):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
from unittest import mock

import pytest
from zigpy.config import CONF_DEVICE_PATH
from zigpy.config import CONF_DEVICE_BAUDRATE, CONF_DEVICE_PATH
import zigpy.serial

from zigpy_deconz import uart
from zigpy_deconz.config import CONF_DEVICE_BAUDRATE


@pytest.fixture
Expand Down

0 comments on commit 4463803

Please sign in to comment.