feat: add wutta import-csv
command
This commit is contained in:
parent
84a8beaf46
commit
f43a066341
19 changed files with 500 additions and 15 deletions
38
tests/cli/test_base.py
Normal file
38
tests/cli/test_base.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
#-*- coding: utf-8; -*-
|
||||
|
||||
import inspect
|
||||
from unittest import TestCase
|
||||
|
||||
from wuttasync.cli import base as mod
|
||||
|
||||
|
||||
class TestImporterCommand(TestCase):
|
||||
|
||||
def test_basic(self):
|
||||
def myfunc(ctx, **kwargs):
|
||||
pass
|
||||
|
||||
sig1 = inspect.signature(myfunc)
|
||||
self.assertIn('kwargs', sig1.parameters)
|
||||
self.assertNotIn('dry_run', sig1.parameters)
|
||||
wrapt = mod.importer_command(myfunc)
|
||||
sig2 = inspect.signature(wrapt)
|
||||
self.assertNotIn('kwargs', sig2.parameters)
|
||||
self.assertIn('dry_run', sig2.parameters)
|
||||
|
||||
|
||||
class TestFileImporterCommand(TestCase):
|
||||
|
||||
def test_basic(self):
|
||||
def myfunc(ctx, **kwargs):
|
||||
pass
|
||||
|
||||
sig1 = inspect.signature(myfunc)
|
||||
self.assertIn('kwargs', sig1.parameters)
|
||||
self.assertNotIn('dry_run', sig1.parameters)
|
||||
self.assertNotIn('input_file_path', sig1.parameters)
|
||||
wrapt = mod.file_importer_command(myfunc)
|
||||
sig2 = inspect.signature(wrapt)
|
||||
self.assertNotIn('kwargs', sig2.parameters)
|
||||
self.assertIn('dry_run', sig2.parameters)
|
||||
self.assertIn('input_file_path', sig2.parameters)
|
Loading…
Add table
Add a link
Reference in a new issue