Improve type hints in axis tests (#119260)

* Improve type hints in axis tests

* A couple more

* One more

* Improve light

* Improve hub

* Improve config-flow
This commit is contained in:
epenet 2024-06-10 08:49:43 +02:00 committed by GitHub
parent 2d2f5de191
commit d9362a2f2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 101 additions and 71 deletions

View file

@ -30,7 +30,8 @@ async def test_platform_manually_configured(hass: HomeAssistant) -> None:
assert AXIS_DOMAIN not in hass.data
async def test_camera(hass: HomeAssistant, setup_config_entry: ConfigEntry) -> None:
@pytest.mark.usefixtures("setup_config_entry")
async def test_camera(hass: HomeAssistant) -> None:
"""Test that Axis camera platform is loaded properly."""
assert len(hass.states.async_entity_ids(CAMERA_DOMAIN)) == 1
@ -50,9 +51,8 @@ async def test_camera(hass: HomeAssistant, setup_config_entry: ConfigEntry) -> N
@pytest.mark.parametrize("config_entry_options", [{CONF_STREAM_PROFILE: "profile_1"}])
async def test_camera_with_stream_profile(
hass: HomeAssistant, setup_config_entry: ConfigEntry
) -> None:
@pytest.mark.usefixtures("setup_config_entry")
async def test_camera_with_stream_profile(hass: HomeAssistant) -> None:
"""Test that Axis camera entity is using the correct path with stream profike."""
assert len(hass.states.async_entity_ids(CAMERA_DOMAIN)) == 1
@ -74,7 +74,7 @@ async def test_camera_with_stream_profile(
)
property_data = f"""root.Properties.API.HTTP.Version=3
PROPERTY_DATA = f"""root.Properties.API.HTTP.Version=3
root.Properties.API.Metadata.Metadata=yes
root.Properties.API.Metadata.Version=1.0
root.Properties.EmbeddedDevelopment.Version=2.16
@ -85,7 +85,7 @@ root.Properties.System.SerialNumber={MAC}
"""
@pytest.mark.parametrize("param_properties_payload", [property_data])
@pytest.mark.parametrize("param_properties_payload", [PROPERTY_DATA])
async def test_camera_disabled(
hass: HomeAssistant, prepare_config_entry: Callable[[], ConfigEntry]
) -> None: