mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 18:54:08 +00:00
Fix incorrect state updates in FakeTestProtocols (#861)
This commit is contained in:
@@ -20,6 +20,7 @@ async def test_brightness_component(dev: SmartDevice):
|
||||
|
||||
# Test setting the value
|
||||
await feature.set_value(10)
|
||||
await dev.update()
|
||||
assert feature.value == 10
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
@@ -42,6 +43,7 @@ async def test_brightness_dimmable(dev: SmartDevice):
|
||||
|
||||
# Test setting the value
|
||||
await feature.set_value(10)
|
||||
await dev.update()
|
||||
assert feature.value == 10
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
|
@@ -20,6 +20,7 @@ async def test_colortemp_component(dev: SmartDevice):
|
||||
# We need to take the min here, as L9xx reports a range [9000, 9000].
|
||||
new_value = min(feature.minimum_value + 1, feature.maximum_value)
|
||||
await feature.set_value(new_value)
|
||||
await dev.update()
|
||||
assert feature.value == new_value
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
|
Reference in New Issue
Block a user