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:
Ghostkeeper 2017-04-07 16:54:21 +02:00
parent d5df226024
commit 7158ebdaea
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -450,6 +450,7 @@ def test_getPropertyWithResolve(global_stack):
empty = unittest.mock.MagicMock() #Sets no value or resolve.
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
assert global_stack.getProperty("material_bed_temperature", "value") == 7.5 #Resolve wins in the definition.
global_stack.userChanges = resolve_and_value