feat: add support for Wutta <-> Wutta import/export

This commit is contained in:
Lance Edgar 2026-03-17 17:15:34 -05:00
parent bfc45bd0f0
commit ae282ab468
25 changed files with 719 additions and 21 deletions

39
tests/test_conf.py Normal file
View file

@ -0,0 +1,39 @@
# -*- coding: utf-8; -*-
from wuttjamaican.testing import ConfigTestCase
from wuttasync import conf as mod
class TestWuttaSyncConfig(ConfigTestCase):
def make_extension(self):
return mod.WuttaSyncConfig()
def test_default_import_handlers(self):
# base config has no default handlers
spec = self.config.get(
"wuttasync.importing.import.to_wutta.from_wutta.default_handler"
)
self.assertIsNone(spec)
spec = self.config.get(
"wuttasync.importing.export.to_wutta.from_wutta.default_handler"
)
self.assertIsNone(spec)
# extend config
ext = self.make_extension()
ext.configure(self.config)
# config now has default handlers
spec = self.config.get(
"wuttasync.importing.import.to_wutta.from_wutta.default_handler"
)
self.assertIsNotNone(spec)
self.assertEqual(spec, "wuttasync.importing.wutta:FromWuttaToWuttaImport")
spec = self.config.get(
"wuttasync.importing.export.to_wutta.from_wutta.default_handler"
)
self.assertIsNotNone(spec)
self.assertEqual(spec, "wuttasync.importing.wutta:FromWuttaToWuttaExport")