Skip to content

Commit

Permalink
Test: Fix tests for changed classes
Browse files Browse the repository at this point in the history
  • Loading branch information
3j14 committed Nov 11, 2024
1 parent 2573ab6 commit c4a318b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_backup_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_backup_check_config_password_env(
@pytest.mark.usefixtures("clean_env")
def test_backup_check_config_mount(working_config):
with pytest.raises(ConfigError, match="mount"):
Backup.check_config(working_config, subcommand="mount")
Backup.check_config(working_config, command="mount")


@pytest.mark.usefixtures("clean_env")
Expand Down
10 changes: 5 additions & 5 deletions tests/test_tailscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@pytest.mark.usefixtures("patch_executables")
def test_tailscale_status(monkeypatch: pytest.MonkeyPatch):
tailscale = Tailscale(connected=True, exit_node="exit")
tailscale = Tailscale("cmd", connected=True, exit_node="exit")
mock = MagicMock()
mock.return_value = SimpleNamespace()
mock.return_value.stdout = "{}"
Expand Down Expand Up @@ -68,7 +68,7 @@ def test_tailscale_status(monkeypatch: pytest.MonkeyPatch):
def test_tailscale_exit_node_status(
status: dict, ret_val: str | None, monkeypatch: pytest.MonkeyPatch
):
tailscale = Tailscale(connected=True, exit_node="exit")
tailscale = Tailscale("cmd", connected=True, exit_node="exit")
mock = MagicMock()
mock.return_value = SimpleNamespace()
mock.return_value.stdout = json.dumps(status)
Expand All @@ -90,7 +90,7 @@ def test_tailscale_exit_node_status(
def test_tailscale_connection_status(
status: dict, connected: bool, monkeypatch: pytest.MonkeyPatch
):
tailscale = Tailscale(connected=True, exit_node="exit")
tailscale = Tailscale("cmd", connected=True, exit_node="exit")
mock = MagicMock()
mock.return_value = SimpleNamespace()
mock.return_value.stdout = json.dumps(status)
Expand All @@ -105,7 +105,7 @@ def test_tailscale_connection_status(
)
@pytest.mark.usefixtures("patch_executables")
def test_tailscale_up_down(initial, desired, monkeypatch: pytest.MonkeyPatch):
tailscale = Tailscale(connected=desired, exit_node=None)
tailscale = Tailscale("cmd", connected=desired, exit_node=None)
exe = tailscale.executable
mock_up_down = MagicMock()
mock_connected = MagicMock()
Expand Down Expand Up @@ -137,7 +137,7 @@ def test_tailscale_up_down(initial, desired, monkeypatch: pytest.MonkeyPatch):
)
@pytest.mark.usefixtures("patch_executables")
def test_tailscale_exit_node(initial, desired, monkeypatch: pytest.MonkeyPatch):
tailscale = Tailscale(connected=True, exit_node=desired)
tailscale = Tailscale("cmd", connected=True, exit_node=desired)
exe = tailscale.executable
mock_set_exit_node = MagicMock()
mock_connected = MagicMock()
Expand Down

0 comments on commit c4a318b

Please sign in to comment.