fix: add mock for nix collect garbage
continuous-integration/drone/push Build is failing Details

pull/21/head
dettlaff 2024-01-30 18:04:43 +04:00
parent d923b04aef
commit 045ad30ec3
1 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,11 @@ note: currently hard linking saves 0.00 MiB
log_event = []
@pytest.fixture
def mock_delete_old_gens_and_print_dead(mocker):
mock = mocker.patch("selfprivacy_api.jobs.nix_collect_garbage.delete_old_gens_and_print_dead", autospec=True, return_value=None)
return mock
# ---
@ -119,7 +124,7 @@ mutation CollectGarbage {
"""
def test_graphql_nix_collect_garbage(authorized_client):
def test_graphql_nix_collect_garbage(authorized_client, mock_delete_old_gens_and_print_dead):
response = authorized_client.post(
"/graphql",
json={