Mock the extruderList

Otherwise the list of extruders becomes a MagicMock. Adding a list to a MagicMock is again a MagicMock, and when iterating over that it doesn't result in any iterations. As a result, the for loop that clears all user containers didn't clear anything and the test failed.
This commit is contained in:
Ghostkeeper 2020-06-02 13:46:17 +02:00
parent be814535e9
commit 825a34d418
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -14,6 +14,7 @@ class TestContainerManager(TestCase):
self._application = MagicMock()
self._container_registry = MagicMock()
self._machine_manager = MagicMock()
self._machine_manager.activeMachine.extruderList = [MagicMock(name="Left Extruder Mock"), MagicMock(name="Right Extruder Mock")]
self._mocked_mime = MagicMock()
self._mocked_mime.preferredSuffix = "omg"