Skip to content

Commit

Permalink
hack: try to get the bool itself to come from the pytest exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jharmison-redhat committed Oct 18, 2023
1 parent 7b2360f commit cfb4017
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/unit/plugins/modules/test_start_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit cfb4017

Please sign in to comment.