diff --git a/tests/docker/test_addon.py b/tests/docker/test_addon.py index bd284f49db8..62ac7393bf9 100644 --- a/tests/docker/test_addon.py +++ b/tests/docker/test_addon.py @@ -184,7 +184,6 @@ def test_not_journald_addon( async def test_addon_run_docker_error( coresys: CoreSys, addonsdata_system: dict[str, Data], - capture_exception: Mock, os_environ, ): """Test docker error when addon is run.""" @@ -196,14 +195,13 @@ async def test_addon_run_docker_error( with patch.object(DockerAddon, "stop"), patch.object( AddonOptions, "validate", new=PropertyMock(return_value=lambda _: None) - ), pytest.raises(DockerNotFound): + ), patch.object(DockerAddon, "install"), pytest.raises(DockerNotFound): await docker_addon.run() assert ( Issue(IssueType.MISSING_IMAGE, ContextType.ADDON, reference="test_addon") in coresys.resolution.issues ) - capture_exception.assert_not_called() async def test_addon_run_add_host_error( diff --git a/tests/docker/test_interface.py b/tests/docker/test_interface.py index 6fc649f0f4a..13b256ff542 100644 --- a/tests/docker/test_interface.py +++ b/tests/docker/test_interface.py @@ -242,5 +242,5 @@ async def test_run_missing_image( await install_addon_ssh.instance.run() install.assert_called_once_with(AwesomeVersion("9.2.1"), None, False, None) - coresys.docker.containers.create.call_count == 2 + assert coresys.docker.containers.create.call_count == 2 capture_exception.assert_called_once()