mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06: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
1 changed files with 1 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue