mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Fix warnings in our test suite (#1246)
Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
@@ -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(
|
||||
|
@@ -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(
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user