Drop deprecated, type-specific options in favor of --type (#336)

* Drop deprecated, type-specific options in favor of --type

* Fix tests
This commit is contained in:
Teemu R
2022-04-06 03:39:50 +02:00
committed by GitHub
parent 6e988bd9a9
commit 631762b50c
2 changed files with 3 additions and 38 deletions

View File

@@ -106,22 +106,6 @@ async def test_brightness(dev):
assert "Brightness: 12" in res.output
def _generate_type_class_pairs():
yield from TYPE_TO_CLASS.items()
@pytest.mark.parametrize("type_class", _generate_type_class_pairs())
async def test_deprecated_type(dev, type_class, mocker):
"""Make sure that using deprecated types yields a warning."""
type, cls = type_class
if type == "dimmer":
return
runner = CliRunner()
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
async def test_temperature(dev):
pass