From cfb4017fc18d225721e1ca47ac950c8f3e8c27ba Mon Sep 17 00:00:00 2001 From: James Harmison Date: Wed, 18 Oct 2023 10:19:41 -0400 Subject: [PATCH] hack: try to get the bool itself to come from the pytest exception --- tests/unit/plugins/modules/test_start_compose.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/plugins/modules/test_start_compose.py b/tests/unit/plugins/modules/test_start_compose.py index b0c390ba..3bb85cd6 100644 --- a/tests/unit/plugins/modules/test_start_compose.py +++ b/tests/unit/plugins/modules/test_start_compose.py @@ -40,7 +40,13 @@ def test_start_compose_not_valid_image_type(): with pytest.raises(AnsibleFailJson) as fail_json_obj: start_compose(module, weldr=weldr) assert "not a valid image type" in str(fail_json_obj) - assert not fail_json_obj.value['changed'] + print(fail_json_obj.value) + print(type(fail_json_obj.value)) + print(dir(fail_json_obj.value)) + print(fail_json_obj.value.args) + print(type(fail_json_obj.value.args)) + print(dir(fail_json_obj.value.args)) + assert not fail_json_obj.value.changed def test_start_compose_not_supported_image_type():