From e521f6b38d82611c595616405fdddec7c951f37e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Mar 2017 16:35:11 +0100 Subject: [PATCH] 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. --- tests/Settings/TestCuraContainerRegistry.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/Settings/TestCuraContainerRegistry.py b/tests/Settings/TestCuraContainerRegistry.py index d94344be74..97897fcd6d 100644 --- a/tests/Settings/TestCuraContainerRegistry.py +++ b/tests/Settings/TestCuraContainerRegistry.py @@ -36,10 +36,8 @@ def test_loadTypes(filename, output_class, container_registry): else: return [] 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"): container_registry.load()