mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-04-27 09:06:24 +00:00
Fix test_deprecated_type stalling (#325)
This commit is contained in:
parent
6f5a60ad43
commit
2b05751aa7
@ -111,13 +111,14 @@ def _generate_type_class_pairs():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("type_class", _generate_type_class_pairs())
|
@pytest.mark.parametrize("type_class", _generate_type_class_pairs())
|
||||||
async def test_deprecated_type(dev, type_class):
|
async def test_deprecated_type(dev, type_class, mocker):
|
||||||
"""Make sure that using deprecated types yields a warning."""
|
"""Make sure that using deprecated types yields a warning."""
|
||||||
type, cls = type_class
|
type, cls = type_class
|
||||||
if type == "dimmer":
|
if type == "dimmer":
|
||||||
return
|
return
|
||||||
runner = CliRunner()
|
runner = CliRunner()
|
||||||
res = await runner.invoke(cli, ["--host", "127.0.0.2", f"--{type}"])
|
with mocker.patch("kasa.SmartDevice.update"):
|
||||||
|
res = await runner.invoke(cli, ["--host", "127.0.0.2", f"--{type}"])
|
||||||
assert "Using --bulb, --plug, --strip, and --lightstrip is deprecated" in res.output
|
assert "Using --bulb, --plug, --strip, and --lightstrip is deprecated" in res.output
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user