Browse Source

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.
Ghostkeeper 8 years ago
parent
commit
e521f6b38d
1 changed files with 1 additions and 3 deletions
  1. 1 3
      tests/Settings/TestCuraContainerRegistry.py

+ 1 - 3
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()