Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2019-09-06 16:13:25 +0300
committerJaime van Kessel <nallath@gmail.com>2019-09-06 16:13:25 +0300
commitf540abbd73acee940403b0e7fba771b14389b38a (patch)
tree5f11051b43ea7aca67dcb2b63d871c54a117364c /tests/Settings
parentdb604cdd16c184d598f41c7919479ea4b67b213d (diff)
Expand the createUniqueName test
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/TestCuraContainerRegistry.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Settings/TestCuraContainerRegistry.py b/tests/Settings/TestCuraContainerRegistry.py
index 40ae630e4d..cf30cbbee3 100644
--- a/tests/Settings/TestCuraContainerRegistry.py
+++ b/tests/Settings/TestCuraContainerRegistry.py
@@ -36,6 +36,12 @@ def test_createUniqueName(container_registry):
# It should add a #2 to test2
assert container_registry.createUniqueName("user", "test", "test2", "nope") == "test2 #2"
+ # The provided suggestion is already correct, so nothing to do
+ assert container_registry.createUniqueName("user", "test", "test2 #2", "nope") == "test2 #2"
+
+ # In case we don't provide a new name, use the fallback
+ assert container_registry.createUniqueName("user", "test", "", "nope") == "nope"
+
## Tests whether addContainer properly converts to ExtruderStack.
def test_addContainerExtruderStack(container_registry, definition_container, definition_changes_container):