mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user