Fix failing product assignment test after 5a511ee

Moved code from `core`, added a warning so we could possibly narrow down #4014 in the future.
This commit is contained in:
Andrej730
2025-11-13 18:35:19 +05:00
parent b6f1119eaa
commit 339a0606c0
4 changed files with 37 additions and 12 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ class TestDisableEditingAssignedProduct:
class TestEditAssignedProduct:
def test_text_annotation(self, ifc, drawing):
ifc.get_entity("obj").should_be_called().will_return("element")
drawing.get_assigned_product("element").should_be_called().will_return("existing_product")
drawing.get_assigned_product_workaround("element").should_be_called().will_return(["existing_product"])
ifc.run(
"drawing.unassign_product", relating_product="existing_product", related_object="element"
).should_be_called()
@@ -68,7 +68,7 @@ class TestEditAssignedProduct:
def test_non_text_annotation(self, ifc, drawing):
ifc.get_entity("obj").should_be_called().will_return("element")
drawing.get_assigned_product("element").should_be_called().will_return("existing_product")
drawing.get_assigned_product_workaround("element").should_be_called().will_return(["existing_product"])
ifc.run(
"drawing.unassign_product", relating_product="existing_product", related_object="element"
).should_be_called()