mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Let test_setQualityChangesByIdExists use new container registry functionality
It sets the container it expects beforehand and tests for its ID. Contributes to issue CURA-3497.
This commit is contained in:
parent
972e94386c
commit
4db7c6ae66
1 changed files with 3 additions and 8 deletions
|
@ -389,15 +389,10 @@ def test_setQualityByIdDoesntExist(extruder_stack):
|
||||||
|
|
||||||
## Tests setting quality changes by specifying an ID of a quality change that
|
## Tests setting quality changes by specifying an ID of a quality change that
|
||||||
# exists.
|
# exists.
|
||||||
@pytest.mark.skip
|
|
||||||
def test_setQualityChangesByIdExists(extruder_stack, container_registry):
|
def test_setQualityChangesByIdExists(extruder_stack, container_registry):
|
||||||
original_container_registry = UM.Settings.ContainerStack._containerRegistry
|
container_registry.return_value = getInstanceContainer(container_type = "quality_changes")
|
||||||
UM.Settings.ContainerStack._containerRegistry = container_registry #Always has all the profiles you ask of.
|
extruder_stack.setQualityChangesById("InstanceContainer")
|
||||||
|
assert extruder_stack.qualityChanges.getId() == "InstanceContainer"
|
||||||
extruder_stack.setQualityChangesById("some_quality_changes") #The container registry always has a container with the ID.
|
|
||||||
|
|
||||||
#Restore.
|
|
||||||
UM.Settings.ContainerStack._containerRegistry = original_container_registry
|
|
||||||
|
|
||||||
## Tests setting quality changes by specifying an ID of a quality change that
|
## Tests setting quality changes by specifying an ID of a quality change that
|
||||||
# doesn't exist.
|
# doesn't exist.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue