test(services): clean up tests

This commit is contained in:
Houkime 2024-03-04 17:37:26 +00:00
parent 1bed9d87ca
commit ee7c41e0c2
3 changed files with 1 additions and 29 deletions

View file

@ -149,7 +149,7 @@ def volume_folders(tmpdir, mocker):
@pytest.fixture()
def raw_dummy_service(tmpdir):
def raw_dummy_service(tmpdir) -> DummyService:
dirnames = ["test_service", "also_test_service"]
service_dirs = []
for d in dirnames:

View file

@ -105,17 +105,6 @@ def mock_check_volume(mocker):
return mock
# TODO: remove
@pytest.fixture()
def mock_check_service_mover_binds(mocker):
mock = mocker.patch(
"selfprivacy_api.services.service.check_binds",
autospec=True,
return_value=None,
)
return mock
API_START_MUTATION = """
mutation TestStartService($service_id: String!) {
services {
@ -631,8 +620,6 @@ def test_graphql_move_service_without_folders_on_old_volume(
def test_graphql_move_service(
authorized_client,
generic_userdata,
# TODO: substitute with a weaker mock or delete altogether
mock_check_service_mover_binds,
mock_check_volume,
dummy_service_with_binds,
):

View file

@ -80,21 +80,6 @@ def test_paths_from_owned_paths():
]
# def test_foldermoves_from_ownedpaths():
# owned = OwnedPath(
# path="var/lib/bitwarden",
# group="vaultwarden",
# owner="vaultwarden",
# )
# assert FolderMoveNames.from_owned_path(owned) == FolderMoveNames(
# name="bitwarden",
# bind_location="var/lib/bitwarden",
# group="vaultwarden",
# owner="vaultwarden",
# )
def test_enabling_disabling_reads_json(dummy_service: DummyService):
with WriteUserData() as data:
data["modules"][dummy_service.get_id()]["enable"] = False