mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 01:23:14 +08:00
Remove unnecessary findContainer replacement
By default the patch context returns mock objects anyway, so no need to actually make a function that does that. Contributes to issue CURA-3497.
This commit is contained in:
parent
96c7a4ed77
commit
e521f6b38d
@ -36,10 +36,8 @@ def test_loadTypes(filename, output_class, container_registry):
|
|||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
container_registry.findContainers = findContainers
|
container_registry.findContainers = findContainers
|
||||||
def findContainer(container_id = "*", container_type = None, type = "*", category = None):
|
|
||||||
return unittest.mock.MagicMock()
|
|
||||||
|
|
||||||
with unittest.mock.patch("cura.Settings.GlobalStack.GlobalStack.findContainer", findContainer):
|
with unittest.mock.patch("cura.Settings.GlobalStack.GlobalStack.findContainer"):
|
||||||
with unittest.mock.patch("os.remove"):
|
with unittest.mock.patch("os.remove"):
|
||||||
container_registry.load()
|
container_registry.load()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user