8000 Fix test_deprecated_type stalling · python-kasa/python-kasa@cf25c75 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf25c75

Browse files
committed
Fix test_deprecated_type stalling
1 parent 6f5a60a commit cf25c75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kasa/tests/test_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ def _generate_type_class_pairs():
111111

112112

113113
@pytest.mark.parametrize("type_class", _generate_type_class_pairs())
114-
async def test_deprecated_type(dev, type_class):
114+
async def test_deprecated_type(dev, type_class, mocker):
115115
"""Make sure that using deprecated types yields a warning."""
116116
type, cls = type_class
117117
if type == "dimmer":
118118
return
119119
runner = CliRunner()
120-
res = await runner.invoke(cli, ["--host", "127.0.0.2", f"--{type}"])
120+
with mocker.patch("kasa.SmartDevice.update"):
121+
res = await runner.invoke(cli, ["--host", "127.0.0.2", f"--{type}"])
121122
assert "Using --bulb, --plug, --strip, and --lightstrip is deprecated" in res.output
122123

123124

0 commit comments

Comments
 (0)
0