fix nextcloud password setting

add missing function for help
This commit is contained in:
cclecle
2024-03-31 00:45:55 +00:00
parent 9581772c9e
commit f4ac5360b7
3 changed files with 9 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ class A_DataSync(ABC):
"""Abstract DataSync class"""
service_name: str = "ABSTRACT"
priority: int = 0
@classmethod
@final
@@ -178,3 +179,8 @@ class DataSync_Factory:
"""decorator to register a concrete class to the factory"""
cls.ar_cls_DataSync.add(_cls)
return _cls
@classmethod
def get_list(cls) -> list[str]:
"""return the available DataSync concrete class name list"""
return [ _.service_name for _ in cls.ar_cls_DataSync]

View File

@@ -32,6 +32,7 @@ class C_DataSync_NextCloud(A_DataSync):
"""Concrete DataSync class - Nextcloud"""
service_name: str = "Nextcloud"
priority: int = 100
def __init__(self, manifest: dict[Any, Any], cls_compressor: type[A_DataSync_Compressor]) -> None:
super().__init__(manifest, cls_compressor)

View File

@@ -44,8 +44,8 @@ class TestDabDataSync(unittest.TestCase):
nextcloud_pwd=pwd_file.read()
else:
raise RuntimeError("NextCloud pwd file not found")
files = glob.glob(str(testdir_path / "test_data" / "*.json"))
files += glob.glob(str(testdir_path / "test_data2" / "*.json"))
files = glob.glob(str(testdir_path / "*.json"))
files += glob.glob(str(testdir_path /"*.json"))
for file in files:
with open(file) as f:
data = json.load(f)