mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 07:38:58 +08:00
Fix testing ID of mock-definitions
This isn't the best solution because all definitions now have to get the ID 'some_definition', but it's the best that I could come up with so far. Contributes to issue CURA-3497.
This commit is contained in:
parent
610d2ae1e6
commit
8a3ab6d289
@ -28,7 +28,9 @@ def findSomeContainers(container_id = "*", container_type = None, type = None, c
|
||||
if container_id.startswith("some_"):
|
||||
return UM.Settings.ContainerRegistry._EmptyInstanceContainer(container_id)
|
||||
if container_type == DefinitionContainer:
|
||||
return unittest.mock.MagicMock()
|
||||
definition_mock = unittest.mock.MagicMock()
|
||||
definition_mock.getId = unittest.mock.MagicMock(return_value = "some_definition") #getId returns some_definition.
|
||||
return definition_mock
|
||||
|
||||
## Helper function to read the contents of a container stack in the test
|
||||
# stack folder.
|
||||
|
Loading…
x
Reference in New Issue
Block a user