From d575fc540c5d332caa2cf2ab95ef849ccead1476 Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Mon, 21 Nov 2022 16:10:49 +0100 Subject: [PATCH] TEST: Testing special attributes merge conflict error msg. --- unittests/test_apiutils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unittests/test_apiutils.py b/unittests/test_apiutils.py index 155c04ce..0ba284a1 100644 --- a/unittests/test_apiutils.py +++ b/unittests/test_apiutils.py @@ -496,8 +496,11 @@ def test_force_merge(): recB = db.Record() recB.description = "something else" - with pytest.raises(EntityMergeConflictError): + with pytest.raises(EntityMergeConflictError) as emce: merge_entities(recA, recB) + assert str(emce.value) == """Conflict in special attribute description: +A: something +B: something else""" merge_entities(recA, recB, force=True) assert recA.description == "something else" -- GitLab