mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Guard against type checking of DefinitionContainer
Otherwise it finds that we're trying to set a MagicMock into the definition slot. Contributes to issue CURA-3497.
This commit is contained in:
parent
7158ebdaea
commit
16b3c78667
1 changed files with 2 additions and 1 deletions
|
@ -517,7 +517,8 @@ def test_removeContainer(global_stack):
|
|||
|
||||
## Tests setting definitions by specifying an ID of a definition that exists.
|
||||
def test_setDefinitionByIdExists(global_stack, container_registry):
|
||||
global_stack.setDefinitionById("some_definition") #The container registry always has a container with the ID.
|
||||
with unittest.mock.patch("cura.Settings.CuraContainerStack.DefinitionContainer", unittest.mock.MagicMock): #To guard against type checking the DefinitionContainer.
|
||||
global_stack.setDefinitionById("some_definition") #The container registry always has a container with the ID.
|
||||
|
||||
## Tests setting definitions by specifying an ID of a definition that doesn't
|
||||
# exist.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue