fix nextcloud password setting
add missing function for help
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user