feat: add support for --comment CLI param, to set versioning comment

only relevant if Wutta-Continuum is enabled
This commit is contained in:
Lance Edgar 2025-12-29 12:49:39 -06:00
parent 6ee008e169
commit e397890098
7 changed files with 49 additions and 38 deletions

View file

@ -53,11 +53,19 @@ class TestImportCommandHandler(DataTestCase):
self.__dict__.update(kw)
with patch.object(handler, "import_handler") as import_handler:
parent = Mock(params={"runas_username": "fred"})
parent = Mock(
params={
"runas_username": "fred",
"comment": "hello world",
}
)
# TODO: why can't we just use Mock here? the parent attr is problematic
ctx = Object(params={"models": []}, parent=parent)
handler.run(ctx)
import_handler.process_data.assert_called_once_with(runas_username="fred")
import_handler.process_data.assert_called_once_with(
runas_username="fred",
transaction_comment="hello world",
)
def test_list_models(self):
handler = self.make_handler(