mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
Introduce a "writable global stack" fixture
This one has MockContainers set for all containers that allow calling setProperty
This commit is contained in:
parent
317576e983
commit
87ce6246d8
1 changed files with 11 additions and 0 deletions
|
@ -81,6 +81,17 @@ def container_registry():
|
|||
def global_stack() -> cura.Settings.GlobalStack.GlobalStack:
|
||||
return cura.Settings.GlobalStack.GlobalStack("TestStack")
|
||||
|
||||
@pytest.fixture()
|
||||
def writable_global_stack(global_stack):
|
||||
global_stack.userChanges = MockContainer("test_user_changes", "user")
|
||||
global_stack.qualityChanges = MockContainer("test_quality_changes", "quality_changes")
|
||||
global_stack.quality = MockContainer("test_quality", "quality")
|
||||
global_stack.material = MockContainer("test_material", "material")
|
||||
global_stack.variant = MockContainer("test_variant", "variant")
|
||||
global_stack.definitionChanges = MockContainer("test_definition_changes", "definition_changes")
|
||||
global_stack.definition = DefinitionContainerSubClass()
|
||||
return global_stack
|
||||
|
||||
## Place-in function for findContainer that finds only containers that start
|
||||
# with "some_".
|
||||
def findSomeContainers(container_id = "*", container_type = None, type = None, category = "*"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue