mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:59:00 +08:00
Fix tests
CURA-7835
This commit is contained in:
parent
037b5d5b44
commit
cd76326fed
@ -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…
x
Reference in New Issue
Block a user