Skip to content

Commit

Permalink
update admin tests for tails5-6 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
zenmonkeykstop committed Feb 5, 2024
1 parent 712ee95 commit 7eba7fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin/tests/test_securedrop-admin-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def test_python3_buster_venv_deleted_in_bullseye(self, tmpdir, caplog):
with mock.patch("bootstrap.is_tails", return_value=True):
with mock.patch("builtins.open", mock.mock_open(read_data='TAILS_VERSION_ID="5.0"')):
bootstrap.clean_up_old_tails_venv(venv_path)
assert "Tails 4 virtualenv detected." in caplog.text
assert "Tails 4 virtualenv deleted." in caplog.text
assert "Tails 5 virtualenv detected." in caplog.text
assert "Tails 5 virtualenv deleted." in caplog.text
assert not os.path.exists(venv_path)

def test_python3_bullseye_venv_not_deleted_in_bullseye(self, tmpdir, caplog):
Expand All @@ -93,7 +93,7 @@ def test_python3_bullseye_venv_not_deleted_in_bullseye(self, tmpdir, caplog):
with mock.patch("bootstrap.is_tails", return_value=True):
with mock.patch("subprocess.check_output", return_value="bullseye"):
bootstrap.clean_up_old_tails_venv(venv_path)
assert "Tails 4 virtualenv detected" not in caplog.text
assert "Tails 5 virtualenv detected" not in caplog.text
assert os.path.exists(venv_path)

def test_python3_buster_venv_not_deleted_in_buster(self, tmpdir, caplog):
Expand Down

0 comments on commit 7eba7fd

Please sign in to comment.