feat: add support for wutta export-csv command
This commit is contained in:
parent
c873cc462e
commit
61deaad251
21 changed files with 1186 additions and 16 deletions
22
tests/cli/test_export_csv.py
Normal file
22
tests/cli/test_export_csv.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
from unittest import TestCase
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from wuttasync.cli import export_csv as mod, ImportCommandHandler
|
||||
|
||||
|
||||
class TestExportCsv(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.export_csv(ctx)
|
||||
run.assert_called_once_with(ctx)
|
||||
Loading…
Add table
Add a link
Reference in a new issue