feat: add the import-versions command, handler logic
only works if wutta-continuum is already installed and enabled. this also rearranges some existing classes, for better consistency
This commit is contained in:
parent
c38cd2c179
commit
fc250a433c
19 changed files with 1345 additions and 76 deletions
22
tests/cli/test_import_versions.py
Normal file
22
tests/cli/test_import_versions.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from wuttasync.cli import import_versions as mod, ImportCommandHandler
|
||||
|
||||
|
||||
class TestImportCsv(TestCase):
|
||||
|
||||
def test_basic(self):
|
||||
params = {
|
||||
"models": [],
|
||||
"create": True,
|
||||
"update": True,
|
||||
"delete": False,
|
||||
"dry_run": True,
|
||||
}
|
||||
ctx = MagicMock(params=params)
|
||||
with patch.object(ImportCommandHandler, "run") as run:
|
||||
mod.import_versions(ctx)
|
||||
run.assert_called_once_with(params)
|
||||
Loading…
Add table
Add a link
Reference in a new issue