diff --git a/tests/Settings/TestGlobalStack.py b/tests/Settings/TestGlobalStack.py index 48402850bc..592f41a91f 100644 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -446,7 +446,7 @@ def test_setDefinitionByIdExists(global_stack, container_registry): ## Tests setting definitions by specifying an ID of a definition that doesn't # exist. def test_setDefinitionByIdDoesntExist(global_stack): - with pytest.raises(KeyError): + with pytest.raises(InvalidContainerError): global_stack.setDefinitionById("some_definition") #Container registry is empty now. ## Tests setting definition changes by specifying an ID of a container that @@ -457,7 +457,7 @@ def test_setDefinitionChangesByIdExists(global_stack, container_registry): ## Tests setting definition changes by specifying an ID of a container that # doesn't exist. def test_setDefinitionChangesByIdDoesntExist(global_stack): - with pytest.raises(KeyError): + with pytest.raises(InvalidContainerError): global_stack.setDefinitionChangesById("some_definition_changes") #Container registry is empty now. ## Tests setting materials by specifying an ID of a material that exists. @@ -467,7 +467,7 @@ def test_setMaterialByIdExists(global_stack, container_registry): ## Tests setting materials by specifying an ID of a material that doesn't # exist. def test_setMaterialByIdDoesntExist(global_stack): - with pytest.raises(KeyError): + with pytest.raises(InvalidContainerError): global_stack.setMaterialById("some_material") #Container registry is empty now. ## Tests whether changing the next stack is properly forbidden. @@ -522,7 +522,7 @@ def test_setQualityByIdExists(global_stack, container_registry): ## Tests setting qualities by specifying an ID of a quality that doesn't exist. def test_setQualityByIdDoesntExist(global_stack): - with pytest.raises(KeyError): + with pytest.raises(InvalidContainerError): global_stack.setQualityById("some_quality") #Container registry is empty now. ## Tests setting quality changes by specifying an ID of a quality change that @@ -533,7 +533,7 @@ def test_setQualityChangesByIdExists(global_stack, container_registry): ## Tests setting quality changes by specifying an ID of a quality change that # doesn't exist. def test_setQualityChangesByIdDoesntExist(global_stack): - with pytest.raises(KeyError): + with pytest.raises(InvalidContainerError): global_stack.setQualityChangesById("some_quality_changes") #Container registry is empty now. ## Tests setting variants by specifying an ID of a variant that exists.