Fix warnings in our test suite (#1246)

Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
Teemu R.
2024-11-13 17:10:06 +01:00
committed by GitHub
parent 157ad8e807
commit a82ee56a27
16 changed files with 197 additions and 155 deletions

View File

@@ -1,6 +1,6 @@
import pytest
from kasa import Module, SmartDevice
from kasa import Device, Module
from ...device_fixtures import parametrize
@@ -16,7 +16,7 @@ contact = parametrize(
("is_open", bool),
],
)
async def test_contact_features(dev: SmartDevice, feature, type):
async def test_contact_features(dev: Device, feature, type):
"""Test that features are registered and work as expected."""
contact = dev.modules.get(Module.ContactSensor)
assert contact is not None

View File

@@ -71,7 +71,7 @@ async def test_light_effect_brightness(
if effect_active:
assert light_effect.is_active
assert light_effect.brightness == dev.brightness
assert light_effect.brightness == light_module.brightness
light_effect_set_brightness.assert_called_with(10)
mock_light_effect_call.assert_called_with(

View File

@@ -86,7 +86,7 @@ async def test_light_effect_brightness(
if effect_active:
assert light_effect.is_active
assert light_effect.brightness == dev.brightness
assert light_effect.brightness == light_module.brightness
light_effect_set_brightness.assert_called_with(10)
mock_light_effect_call.assert_called_with(

View File

@@ -1,6 +1,6 @@
import pytest
from kasa import Module, SmartDevice
from kasa import Device, Module
from ...device_fixtures import parametrize
@@ -16,7 +16,7 @@ motion = parametrize(
("motion_detected", bool),
],
)
async def test_motion_features(dev: SmartDevice, feature, type):
async def test_motion_features(dev: Device, feature, type):
"""Test that features are registered and work as expected."""
motion = dev.modules.get(Module.MotionSensor)
assert motion is not None