Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArjen Hiemstra <ahiemstra@heimr.nl>2017-05-04 16:57:47 +0300
committerArjen Hiemstra <ahiemstra@heimr.nl>2017-05-04 16:57:47 +0300
commit51b76acc6d094c8a10ed0b433e80d1a60601b9a6 (patch)
treeedfba698d49b0c1b7c15048e26476c5b5ee0614b /tests
parent230740ed64b0bc7ff401e4cb6b15545e87678363 (diff)
Fix unit test
CuraContainerRegistry::load now has a dependency on the ContainerStack so we need to account for it in our mocks.
Diffstat (limited to 'tests')
-rw-r--r--tests/Settings/TestCuraContainerRegistry.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/Settings/TestCuraContainerRegistry.py b/tests/Settings/TestCuraContainerRegistry.py
index 9cdad7c306..7b191a8376 100644
--- a/tests/Settings/TestCuraContainerRegistry.py
+++ b/tests/Settings/TestCuraContainerRegistry.py
@@ -77,7 +77,10 @@ def test_loadLegacyFileRenamed(container_registry):
def findContainers(container_type = 0, id = None):
if id == "MachineLegacy":
return None
- return [UM.Settings.ContainerRegistry._EmptyInstanceContainer(id)]
+
+ container = UM.Settings.ContainerRegistry._EmptyInstanceContainer(id)
+ container.getNextStack = unittest.mock.MagicMock()
+ return [container]
old_find_containers = container_registry.findContainers
container_registry.findContainers = findContainers