fix: allow passing just key to ImportCommandHandler

so config can override designated handler, and command still work
This commit is contained in:
Lance Edgar 2025-12-20 16:33:06 -06:00
parent 19574ea4a0
commit 7e3e892002
4 changed files with 31 additions and 12 deletions

View file

@ -34,6 +34,10 @@ class TestImportCommandHandler(DataTestCase):
handler = self.make_handler(import_handler=myhandler)
self.assertIs(handler.import_handler, myhandler)
# as key
handler = self.make_handler(key="import.to_wutta.from_csv")
self.assertIsInstance(handler.import_handler, FromCsvToWutta)
def test_run(self):
handler = self.make_handler(
import_handler="wuttasync.importing.csv:FromCsvToWutta"