mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-24 21:50:21 +00:00
Improve testing harness to allow tests on real devices (#197)
* test_cli: provide return values to patched objects to avoid warning about non-awaited calls
* test_cli: restore alias after testing
* smartstrip: remove internal update() calls for turn_{on,off}, set_led
* Make sure power is always a float
* Fix discovery tests
* Make tests runnable on real devices
* Add a note about running tests on a real device
* test_strip: run update against the parent device
This commit is contained in:
@@ -247,6 +247,7 @@ async def alias(dev, new_alias, index):
|
||||
if new_alias is not None:
|
||||
click.echo(f"Setting alias to {new_alias}")
|
||||
click.echo(await dev.set_alias(new_alias))
|
||||
await dev.update()
|
||||
|
||||
click.echo(f"Alias: {dev.alias}")
|
||||
if dev.is_strip:
|
||||
|
||||
Reference in New Issue
Block a user