Skip to content

Commit

Permalink
Fix lint and run error test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 committed Oct 12, 2023
1 parent 31e8adc commit 313e68f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tests/docker/test_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 313e68f

Please sign in to comment.