mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Fix test_setVariantByIdExists
It now also uses the return_value construct. Contributes to issue CURA-3497.
This commit is contained in:
parent
f08053283e
commit
e0c8a52eec
1 changed files with 3 additions and 2 deletions
|
@ -597,8 +597,9 @@ def test_setQualityChangesByIdDoesntExist(global_stack):
|
|||
|
||||
## Tests setting variants by specifying an ID of a variant that exists.
|
||||
def test_setVariantByIdExists(global_stack, container_registry):
|
||||
container_registry.typeMetaData = "variant"
|
||||
global_stack.setVariantById("some_variant") #The container registry always has a container with the ID.
|
||||
container_registry.return_value = getInstanceContainer(container_type = "variant")
|
||||
global_stack.setVariantById("InstanceContainer")
|
||||
assert global_stack.variant.getId() == "InstanceContainer"
|
||||
|
||||
## Tests setting variants by specifying an ID of a variant that doesn't exist.
|
||||
def test_setVariantByIdDoesntExist(global_stack):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue