diff --git a/tests/components/axis/conftest.py b/tests/components/axis/conftest.py index 789b4407900..a97520bea0e 100644 --- a/tests/components/axis/conftest.py +++ b/tests/components/axis/conftest.py @@ -54,15 +54,8 @@ def config_entry_fixture(hass, config, options, config_entry_version): @pytest.fixture(name="config_entry_version") def config_entry_version_fixture(request): - """Define a config entry version fixture. - - @pytest.mark.config_entry_version(int) - """ - marker = request.node.get_closest_marker("config_entry_version") - version = 3 - if marker: - version = marker.args[0] - return version + """Define a config entry version fixture.""" + return 3 @pytest.fixture(name="config") @@ -73,15 +66,8 @@ def config_fixture(): @pytest.fixture(name="options") def options_fixture(request): - """Define a config entry options fixture. - - @pytest.mark.config_entry_options(dict) - """ - marker = request.node.get_closest_marker("config_entry_options") - options = ENTRY_OPTIONS.copy() - if marker: - options = marker.args[0] - return options + """Define a config entry options fixture.""" + return ENTRY_OPTIONS.copy() @pytest.fixture(autouse=True) diff --git a/tests/components/axis/test_camera.py b/tests/components/axis/test_camera.py index 7d4a4e85012..5c6e941d540 100644 --- a/tests/components/axis/test_camera.py +++ b/tests/components/axis/test_camera.py @@ -50,7 +50,7 @@ async def test_camera(hass, config_entry): ) -@pytest.mark.config_entry_options({CONF_STREAM_PROFILE: "profile_1"}) +@pytest.mark.parametrize("options", [{CONF_STREAM_PROFILE: "profile_1"}]) async def test_camera_with_stream_profile(hass, config_entry): """Test that Axis camera entity is using the correct path with stream profike.""" await setup_axis_integration(hass, config_entry) diff --git a/tests/components/axis/test_init.py b/tests/components/axis/test_init.py index 446c324987c..72af4c42f43 100644 --- a/tests/components/axis/test_init.py +++ b/tests/components/axis/test_init.py @@ -45,7 +45,7 @@ async def test_unload_entry(hass, config_entry): assert not hass.data[AXIS_DOMAIN] -@pytest.mark.config_entry_version(1) +@pytest.mark.parametrize("config_entry_version", [1]) async def test_migrate_entry(hass, config_entry): """Test successful migration of entry data.""" assert config_entry.version == 1