mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Fix test_setMaterialByIdExists
It now also uses the return_value construct. Contributes to issue CURA-3497.
This commit is contained in:
parent
546cacec37
commit
d652e4564e
1 changed files with 3 additions and 2 deletions
|
@ -516,8 +516,9 @@ def test_setDefinitionChangesByIdDoesntExist(global_stack):
|
|||
|
||||
## Tests setting materials by specifying an ID of a material that exists.
|
||||
def test_setMaterialByIdExists(global_stack, container_registry):
|
||||
container_registry.typeMetaData = "material"
|
||||
global_stack.setMaterialById("some_material") #The container registry always has a container with the ID.
|
||||
container_registry.return_value = getInstanceContainer(container_type = "material")
|
||||
global_stack.setMaterialById("InstanceContainer")
|
||||
assert global_stack.material.getId() == "InstanceContainer"
|
||||
|
||||
## Tests setting materials by specifying an ID of a material that doesn't
|
||||
# exist.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue