mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Fix broken unit tests due to evaluation context
CURA-4498
This commit is contained in:
parent
9488d543de
commit
7d46eead60
2 changed files with 9 additions and 9 deletions
|
@ -251,7 +251,7 @@ def test_getPropertyFallThrough(extruder_stack):
|
|||
for type_id, type_name in container_indices.IndexTypeMap.items():
|
||||
container = unittest.mock.MagicMock()
|
||||
# Return type_id when asking for value and -1 when asking for limit_to_extruder
|
||||
container.getProperty = lambda key, property, type_id = type_id: type_id if (key == "layer_height" and property == "value") else (None if property != "limit_to_extruder" else "-1") #Returns the container type ID as layer height, in order to identify it.
|
||||
container.getProperty = lambda key, property, context = None, type_id = type_id: type_id if (key == "layer_height" and property == "value") else (None if property != "limit_to_extruder" else "-1") #Returns the container type ID as layer height, in order to identify it.
|
||||
container.hasProperty = lambda key, property: key == "layer_height"
|
||||
container.getMetaDataEntry = unittest.mock.MagicMock(return_value = type_name)
|
||||
mock_layer_heights[type_id] = container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue