mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Fix the unit test
Previously we would only look at the state, but that isn't the only thing it should look at. It should override the value of a resolve if it's defined in user changes or QualityChanges.
This commit is contained in:
parent
bc67b057ea
commit
04c216462a
1 changed files with 2 additions and 2 deletions
|
@ -410,13 +410,13 @@ def test_getPropertyInstancesBeforeResolve(global_stack):
|
|||
|
||||
value = unittest.mock.MagicMock() #Sets just the value.
|
||||
value.getProperty = unittest.mock.MagicMock(side_effect = getValueProperty)
|
||||
value.getMetaDataEntry = unittest.mock.MagicMock(return_value = "quality")
|
||||
value.getMetaDataEntry = unittest.mock.MagicMock(return_value = "quality_changes")
|
||||
resolve = unittest.mock.MagicMock() #Sets just the resolve.
|
||||
resolve.getProperty = unittest.mock.MagicMock(side_effect = getResolveProperty)
|
||||
|
||||
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against the type checking.
|
||||
global_stack.definition = resolve
|
||||
global_stack.quality = value
|
||||
global_stack.qualityChanges = value
|
||||
|
||||
assert global_stack.getProperty("material_bed_temperature", "value") == 10
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue