Skip to content

Commit f909042

Browse files
authored
Fix unit tests relying on double config conversion (#261)
* Fix unit tests relying on double config conversion * Bump minimum zigpy version
1 parent 4722403 commit f909042

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ license = {text = "GPL-3.0"}
1515
requires-python = ">=3.8"
1616
dependencies = [
1717
"voluptuous",
18-
"zigpy>=0.60.2",
18+
"zigpy>=0.65.3",
1919
'async-timeout; python_version<"3.11"',
2020
]
2121

tests/test_application.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ def api():
5555

5656
@pytest.fixture
5757
def app(device_path, api):
58-
config = application.ControllerApplication.SCHEMA(
59-
{
60-
**ZIGPY_NWK_CONFIG,
61-
zigpy.config.CONF_DEVICE: {zigpy.config.CONF_DEVICE_PATH: device_path},
62-
}
63-
)
58+
config = {
59+
**ZIGPY_NWK_CONFIG,
60+
zigpy.config.CONF_DEVICE: {zigpy.config.CONF_DEVICE_PATH: device_path},
61+
}
6462

6563
app = application.ControllerApplication(config)
6664

@@ -426,12 +424,10 @@ async def test_delayed_scan():
426424
"""Delayed scan."""
427425

428426
coord = MagicMock()
429-
config = application.ControllerApplication.SCHEMA(
430-
{
431-
zigpy.config.CONF_DEVICE: {zigpy.config.CONF_DEVICE_PATH: "usb0"},
432-
zigpy.config.CONF_DATABASE: "tmp",
433-
}
434-
)
427+
config = {
428+
zigpy.config.CONF_DEVICE: {zigpy.config.CONF_DEVICE_PATH: "usb0"},
429+
zigpy.config.CONF_DATABASE: "tmp",
430+
}
435431

436432
app = application.ControllerApplication(config)
437433
with patch.object(app, "get_device", return_value=coord):

0 commit comments

Comments
 (0)