From 5623a386c1073f172d24b45f1b4582b092895e68 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 14 Jan 2025 09:27:39 -0800 Subject: [PATCH] Fix unit and integration tests (#84554) This is a follow-up to https://github.com/ansible/ansible/pull/84473 --- test/integration/targets/loops/tasks/main.yml | 2 +- test/units/template/test_templar.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/targets/loops/tasks/main.yml b/test/integration/targets/loops/tasks/main.yml index 1f1888f8f92..4eed8dbc672 100644 --- a/test/integration/targets/loops/tasks/main.yml +++ b/test/integration/targets/loops/tasks/main.yml @@ -220,7 +220,7 @@ - assert: that: - with_dict_passed_a_list is failed - - '"with_dict expects a dict" in with_dict_passed_a_list.msg' + - '"lookup plugin expects a dictionary" in with_dict_passed_a_list.msg' - debug: msg: "with_list passed a dict: {{item}}" with_list: "{{ a_dict }}" diff --git a/test/units/template/test_templar.py b/test/units/template/test_templar.py index 920b64fa36b..03fe950724a 100644 --- a/test/units/template/test_templar.py +++ b/test/units/template/test_templar.py @@ -304,14 +304,14 @@ class TestTemplarLookup(BaseTemplar, unittest.TestCase): def test_lookup_jinja_dict_string_passed(self): self.assertRaisesRegex(AnsibleError, - "with_dict expects a dict", + "lookup plugin expects a dictionary", self.templar._lookup, 'dict', '{{ some_var }}') def test_lookup_jinja_dict_list_passed(self): self.assertRaisesRegex(AnsibleError, - "with_dict expects a dict", + "lookup plugin expects a dictionary", self.templar._lookup, 'dict', ['foo', 'bar'])