refactor(backups): set a list of folders for our dummy service

pull/35/head
Houkime 2023-04-14 12:29:23 +00:00 committed by Inex Code
parent 3aefbaaf0b
commit b21d63be63
2 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,8 @@ from selfprivacy_api.services.test_service.icon import BITWARDEN_ICON
class DummyService(Service):
"""A test service"""
def __init_subclass__(cls, location):
cls.location = location
def __init_subclass__(cls, folders: List[str]):
cls.folders = folders
@staticmethod
def get_id() -> str:
@ -113,7 +113,7 @@ class DummyService(Service):
@classmethod
def get_folders(cls) -> List[str]:
return [cls.location]
return cls.folders
@staticmethod
def get_dns_records() -> typing.List[ServiceDnsRecord]:

View File

@ -45,7 +45,7 @@ def raw_dummy_service(tmpdir, backups):
file.write(TESTFILE_BODY)
# we need this to not change get_folders() much
class TestDummyService(DummyService, location=service_dir):
class TestDummyService(DummyService, folders=[service_dir]):
pass
service = TestDummyService()