mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Fix tests
CURA-7835
This commit is contained in:
parent
037b5d5b44
commit
cd76326fed
1 changed files with 5 additions and 1 deletions
|
@ -66,9 +66,12 @@ class TestCalculateBedAdhesionSize:
|
|||
return properties.get(args[2])
|
||||
|
||||
def createAndSetGlobalStack(self, build_volume):
|
||||
mocked_stack = MagicMock()
|
||||
mocked_stack = MagicMock(name = "mocked_stack")
|
||||
mocked_stack.getProperty = MagicMock(side_effect=self.getPropertySideEffect)
|
||||
mocked_extruder = MagicMock(name = "mocked_extruder")
|
||||
mocked_extruder.getProperty = MagicMock(side_effect=self.getPropertySideEffect)
|
||||
|
||||
mocked_stack.extruderList = [mocked_extruder]
|
||||
build_volume._global_container_stack = mocked_stack
|
||||
|
||||
def test_noGlobalStack(self, build_volume: BuildVolume):
|
||||
|
@ -90,6 +93,7 @@ class TestCalculateBedAdhesionSize:
|
|||
self.createAndSetGlobalStack(build_volume)
|
||||
patched_dictionary = self.setting_property_dict.copy()
|
||||
patched_dictionary.update(setting_dict)
|
||||
patched_dictionary.update({"adhesion_extruder_nr": {"value": 0}})
|
||||
with patch.dict(self.setting_property_dict, patched_dictionary):
|
||||
assert build_volume._calculateBedAdhesionSize([]) == result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue