Fix unit test

CuraContainerRegistry::load now has a dependency on the ContainerStack
so we need to account for it in our mocks.
This commit is contained in:
Arjen Hiemstra 2017-05-04 15:57:47 +02:00
parent 230740ed64
commit 51b76acc6d

View file

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