wuttasync/tests/cli/test_import_csv.py
Lance Edgar 33ac0e008e fix: format all code with black
and from now on should not deviate from that...
2025-08-31 12:42:59 -05:00

22 lines
577 B
Python

# -*- coding: utf-8; -*-
from unittest import TestCase
from unittest.mock import MagicMock, patch
from wuttasync.cli import import_csv 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_csv(ctx)
run.assert_called_once_with(params)