Fix tests

This commit is contained in:
Teemu Rytilahti 2024-12-05 16:11:09 +01:00
parent 000ae509d2
commit 2fed0eaf97

View File

@ -41,7 +41,7 @@ async def test_features(dev: SmartDevice, feature: str, prop_name: str, type: ty
[ [
pytest.param({"volume": "low"}, {"alarm_volume": "low"}, id="volume"), pytest.param({"volume": "low"}, {"alarm_volume": "low"}, id="volume"),
pytest.param({"duration": 1}, {"alarm_duration": 1}, id="duration"), pytest.param({"duration": 1}, {"alarm_duration": 1}, id="duration"),
pytest.param({"sound": "Test"}, {"alarm_type": "Test"}, id="sound"), pytest.param({"sound": "Alarm 1"}, {"alarm_type": "Alarm 1"}, id="sound"),
], ],
) )
async def test_play(dev: SmartDevice, kwargs, request_params, mocker: MockerFixture): async def test_play(dev: SmartDevice, kwargs, request_params, mocker: MockerFixture):
@ -67,7 +67,7 @@ async def test_stop(dev: SmartDevice, mocker: MockerFixture):
@pytest.mark.parametrize( @pytest.mark.parametrize(
("method", "value", "target_key"), ("method", "value", "target_key"),
[ [
pytest.param("set_alarm_sound", "Test", "type", id="set_alarm_sound"), pytest.param("set_alarm_sound", "Alarm 1", "type", id="set_alarm_sound"),
pytest.param("set_alarm_volume", "low", "volume", id="set_alarm_volume"), pytest.param("set_alarm_volume", "low", "volume", id="set_alarm_volume"),
pytest.param("set_alarm_duration", 10, "duration", id="set_alarm_duration"), pytest.param("set_alarm_duration", 10, "duration", id="set_alarm_duration"),
], ],