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:
Ghostkeeper 2017-03-23 16:35:11 +01:00
parent 96c7a4ed77
commit e521f6b38d
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -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()