mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -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,6 +450,7 @@ def test_getPropertyWithResolve(global_stack):
|
||||||
empty = unittest.mock.MagicMock() #Sets no value or resolve.
|
empty = unittest.mock.MagicMock() #Sets no value or resolve.
|
||||||
empty.getProperty = unittest.mock.MagicMock(return_value = None)
|
empty.getProperty = unittest.mock.MagicMock(return_value = None)
|
||||||
|
|
||||||
|
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
|
||||||
global_stack.definition = resolve_and_value
|
global_stack.definition = resolve_and_value
|
||||||
assert global_stack.getProperty("material_bed_temperature", "value") == 7.5 #Resolve wins in the definition.
|
assert global_stack.getProperty("material_bed_temperature", "value") == 7.5 #Resolve wins in the definition.
|
||||||
global_stack.userChanges = resolve_and_value
|
global_stack.userChanges = resolve_and_value
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue