mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-30 06:11:09 -07:00
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:
parent
230740ed64
commit
51b76acc6d
1 changed files with 4 additions and 1 deletions
|
|
@ -77,7 +77,10 @@ def test_loadLegacyFileRenamed(container_registry):
|
||||||
def findContainers(container_type = 0, id = None):
|
def findContainers(container_type = 0, id = None):
|
||||||
if id == "MachineLegacy":
|
if id == "MachineLegacy":
|
||||||
return None
|
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
|
old_find_containers = container_registry.findContainers
|
||||||
container_registry.findContainers = findContainers
|
container_registry.findContainers = findContainers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue