mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:29:01 +08: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
@ -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…
x
Reference in New Issue
Block a user