Compare commits
7 Commits
0.3.0.post
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d5cbeed49 | |||
|
|
e95b59ae3d | ||
|
|
7e6aacc82f | ||
| 636316650e | |||
| bfcf65b6e7 | |||
| f39fd9cf44 | |||
|
|
dd45b1281f |
2
.project
2
.project
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>{{project_name}}</name>
|
||||
<name>dabdatasync</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
|
||||
@@ -92,7 +92,7 @@ class dabdatasync_args(Tap):
|
||||
self.command: Union[str, None] = cast(Union[str, None], self.command) # pylint: disable=attribute-defined-outside-init
|
||||
|
||||
|
||||
def fct_main(i_args: list[str]) -> None: # pylint: disable=too-many-branches,too-complex
|
||||
def fct_main(i_args: list[str]) -> None: # pylint: disable=too-many-branches,too-complex,too-many-statements
|
||||
"""CLI main function"""
|
||||
parser: dabdatasync_args = dabdatasync_args(prog=__Name__, description=__Summuary__)
|
||||
|
||||
@@ -104,13 +104,13 @@ def fct_main(i_args: list[str]) -> None: # pylint: disable=too-many-branches,to
|
||||
if args.help:
|
||||
print(parser.format_help())
|
||||
|
||||
for name, subparser in parser._subparsers.choices.items(): # type: ignore[union-attr]
|
||||
for name, subparser in parser._subparsers.choices.items(): # type: ignore[union-attr] # pylint: disable=protected-access
|
||||
print("=========================")
|
||||
print(f"Subparser {{{name}}}")
|
||||
print(subparser.format_help())
|
||||
|
||||
if args.help or args.version:
|
||||
exit(0)
|
||||
sys.exit(0)
|
||||
|
||||
logger.remove()
|
||||
if args.verbosity:
|
||||
|
||||
@@ -44,6 +44,7 @@ class TestDabDataSync(unittest.TestCase):
|
||||
nextcloud_pwd = pwd_file.read()
|
||||
else:
|
||||
raise RuntimeError("NextCloud pwd file not found")
|
||||
|
||||
files = glob.glob(str(testdir_path / "*.json"))
|
||||
files += glob.glob(str(testdir_path / "*.json"))
|
||||
for file in files:
|
||||
@@ -61,6 +62,19 @@ class TestDabDataSync(unittest.TestCase):
|
||||
shutil.rmtree(testdir_path / "test_data", ignore_errors=True)
|
||||
shutil.rmtree(testdir_path / "test_data2", ignore_errors=True)
|
||||
|
||||
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)
|
||||
try:
|
||||
data["Args"]["FSSync_NextCloud_Password"]["value"] = ""
|
||||
except Exception:
|
||||
pass
|
||||
os.remove(file)
|
||||
with open(file, "w") as f:
|
||||
json.dump(data, f, sort_keys=True, indent=4)
|
||||
|
||||
def test_version(self):
|
||||
self.assertNotEqual(dabdatasync.__version__, "?.?.?")
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
},
|
||||
"FSSync_NextCloud_Password": {
|
||||
"type": "STRING",
|
||||
"value": "F3P8m-nQHik-NSmb2-mnFEF-s85RE"
|
||||
"value": ""
|
||||
},
|
||||
"FSSync_NextCloud_Path": {
|
||||
"type": "STRING",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"FSSync_NextCloud_Password": {
|
||||
"type": "STRING",
|
||||
"value": "F3P8m-nQHik-NSmb2-mnFEF-s85RE"
|
||||
"value": ""
|
||||
},
|
||||
"FSSync_NextCloud_Path": {
|
||||
"type": "STRING",
|
||||
|
||||
Reference in New Issue
Block a user