mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Rename some_material to some_instance
This way we can semantically use it in place of other instances on the stack as well without changing our test. Contributes to issue CURA-3497.
This commit is contained in:
parent
007f764471
commit
60b6b72912
7 changed files with 7 additions and 7 deletions
|
@ -31,7 +31,7 @@ def test_loadTypes(filename, output_class, container_registry):
|
||||||
UM.Settings.ContainerStack.setContainerRegistry(container_registry)
|
UM.Settings.ContainerStack.setContainerRegistry(container_registry)
|
||||||
Resources.getAllResourcesOfType = unittest.mock.MagicMock(return_value = [os.path.join(os.path.dirname(os.path.abspath(__file__)), "stacks", filename)]) #Return just this tested file.
|
Resources.getAllResourcesOfType = unittest.mock.MagicMock(return_value = [os.path.join(os.path.dirname(os.path.abspath(__file__)), "stacks", filename)]) #Return just this tested file.
|
||||||
def findContainers(id, container_type = 0):
|
def findContainers(id, container_type = 0):
|
||||||
if id == "some_material" or id == "some_definition":
|
if id == "some_instance" or id == "some_definition":
|
||||||
return [UM.Settings.ContainerRegistry._EmptyInstanceContainer(id)]
|
return [UM.Settings.ContainerRegistry._EmptyInstanceContainer(id)]
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -22,7 +22,7 @@ def test_deserializeUserChanges(filename, user_changes_id):
|
||||||
|
|
||||||
#Mock the loading of the instances.
|
#Mock the loading of the instances.
|
||||||
def findContainer(container_id = "*", container_type = None, type = None, category = "*"):
|
def findContainer(container_id = "*", container_type = None, type = None, category = "*"):
|
||||||
if id == "some_material":
|
if id == "some_instance":
|
||||||
return UM.Settings.ContainerRegistry._EmptyInstanceContainer(id)
|
return UM.Settings.ContainerRegistry._EmptyInstanceContainer(id)
|
||||||
if container_type == DefinitionContainer:
|
if container_type == DefinitionContainer:
|
||||||
return unittest.mock.MagicMock()
|
return unittest.mock.MagicMock()
|
||||||
|
|
|
@ -7,5 +7,5 @@ id = ExtruderLegacy
|
||||||
type = extruder
|
type = extruder
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
3 = some_material
|
3 = some_instance
|
||||||
6 = some_definition
|
6 = some_definition
|
||||||
|
|
|
@ -4,5 +4,5 @@ name = Global
|
||||||
id = Global
|
id = Global
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
3 = some_material
|
3 = some_instance
|
||||||
6 = some_definition
|
6 = some_definition
|
||||||
|
|
|
@ -4,5 +4,5 @@ name = Global
|
||||||
id = Global
|
id = Global
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
3 = some_material
|
3 = some_instance
|
||||||
6 = some_definition
|
6 = some_definition
|
||||||
|
|
|
@ -4,5 +4,5 @@ name = Left
|
||||||
id = Left
|
id = Left
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
3 = some_material
|
3 = some_instance
|
||||||
6 = some_definition
|
6 = some_definition
|
||||||
|
|
|
@ -7,5 +7,5 @@ id = MachineLegacy
|
||||||
type = machine
|
type = machine
|
||||||
|
|
||||||
[containers]
|
[containers]
|
||||||
3 = some_material
|
3 = some_instance
|
||||||
6 = some_definition
|
6 = some_definition
|
Loading…
Add table
Add a link
Reference in a new issue