Don't let a test remove files from hard disk

This test does not test the removing of these files. In general, to make a test run fast, it should not perform any disk operations.

Contributes to issue CURA-3497.
This commit is contained in:
Ghostkeeper 2017-03-22 15:47:15 +01:00
parent 49fad35d28
commit 007f764471
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -41,7 +41,8 @@ def test_loadTypes(filename, output_class, container_registry):
return unittest.mock.MagicMock()
with unittest.mock.patch("cura.Settings.GlobalStack.GlobalStack.findContainer", findContainer):
container_registry.load()
with unittest.mock.patch("os.remove"):
container_registry.load()
#Check whether the resulting type was correct.
stack_id = filename.split(".")[0]