Fix unit test.

It's not enough (or even nescesary) to mock the (now wrapper) method, since we use the underlaying method in our code now.

done as part of CURA-11501
This commit is contained in:
Remco Burema 2024-08-16 00:39:35 +02:00
parent 8805c6a1b5
commit 922c8ccbc9

View file

@ -96,7 +96,7 @@ def test_variantNodeInit(container_registry, machine_node):
def test_variantNodeInit_excludedMaterial(container_registry, machine_node):
machine_node.exclude_materials = ["material_1"]
machine_node.isExcludedMaterial = MagicMock(side_effect=lambda material: material["id"] == "material_1")
machine_node.isExcludedMaterialBaseFile = MagicMock(side_effect=lambda material: material == "material_1")
node = createVariantNode("variant_1", machine_node, container_registry)
assert "material_1" not in node.materials