mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Guard against type checking when replacing definition container
Otherwise it finds that this is not a definition container we're replacing the definition with. Contributes to issue CURA-3497.
This commit is contained in:
parent
d5df226024
commit
7158ebdaea
1 changed files with 2 additions and 1 deletions
|
@ -450,7 +450,8 @@ def test_getPropertyWithResolve(global_stack):
|
|||
empty = unittest.mock.MagicMock() #Sets no value or resolve.
|
||||
empty.getProperty = unittest.mock.MagicMock(return_value = None)
|
||||
|
||||
global_stack.definition = resolve_and_value
|
||||
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
|
||||
global_stack.definition = resolve_and_value
|
||||
assert global_stack.getProperty("material_bed_temperature", "value") == 7.5 #Resolve wins in the definition.
|
||||
global_stack.userChanges = resolve_and_value
|
||||
assert global_stack.getProperty("material_bed_temperature", "value") == 5 #Value wins in other places.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue