Merge branch 'feature/designer' into feature/store-i18n

This commit is contained in:
kevinveenbirkenbach committed 2026-10-16 13:19:15 +02:00
commit 338a2ffa7f
34 files changed
+597 -186

No files matched your search

@@ -56,6 +56,48 @@ class TestApplicationsCarrierActionPlugin(unittest.TestCase):
self.assertEqual(variables, {"applications": {}})
self.assertTrue(kwargs["carrier"])
def test_revalidates_the_tokens_file_before_rendering(self):
order = []
lookup = _FakeLookup({"key": ["roles", []], "applications": {}})
lookup.run = lambda *args, **kwargs: order.append("render") or [{}]
action = _make_action(_FakeTask())
with (
patch(
"plugins.action.applications_carrier.ActionBase.run",
autospec=True,
return_value={},
),
patch(
"plugins.action.applications_carrier.lookup_loader.get",
return_value=lookup,
),
patch(
"plugins.action.applications_carrier.revalidate_tokens_file",
side_effect=lambda variables: order.append(("revalidate", variables)),
),
):
action.run(task_vars={"FILE_TOKENS": "/x/tokens.yml"})
self.assertEqual(
order, [("revalidate", {"FILE_TOKENS": "/x/tokens.yml"}), "render"]
)
def test_clear_does_not_revalidate(self):
action = _make_action(_FakeTask(args={"clear": True}))
with (
patch(
"plugins.action.applications_carrier.ActionBase.run",
autospec=True,
return_value={},
),
patch(
"plugins.action.applications_carrier.revalidate_tokens_file"
) as revalidate,
):
action.run(task_vars={})
revalidate.assert_not_called()
def test_rejects_arguments(self):
action = _make_action(_FakeTask(args={"foo": 1}))
with (