diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-01-02 21:59:25 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-01-02 21:59:30 +0300 |
commit | f3566235ca1e8886328f213013452e12fe4be836 (patch) | |
tree | 0662496a6cec69688a528859a1741f6521f46884 /tests/python/view_layer | |
parent | a9fe94245b9727858f9175c302196a7c722f9181 (diff) |
Layers: Fix collection_rename unittest
This was broken since c9cb5dc3dab0af when we supported same name for
non-sibling collections.
Diffstat (limited to 'tests/python/view_layer')
-rw-r--r-- | tests/python/view_layer/test_collection_rename.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/python/view_layer/test_collection_rename.py b/tests/python/view_layer/test_collection_rename.py index 3fcc5981e68..ea156d7346f 100644 --- a/tests/python/view_layer/test_collection_rename.py +++ b/tests/python/view_layer/test_collection_rename.py @@ -34,7 +34,8 @@ class UnitTesting(ViewLayerTesting): family = self.setup_family() family['mom'].name = family['daughter'].name - self.assertNotEqual(family['mom'].name, family['daughter'].name) + # Since they are not siblings, we allow them to have the same name. + self.assertEqual(family['mom'].name, family['daughter'].name) def test_rename_b(self): family = self.setup_family() @@ -46,7 +47,8 @@ class UnitTesting(ViewLayerTesting): family = self.setup_family() family['cousin'].name = family['daughter'].name - self.assertNotEqual(family['cousin'].name, family['daughter'].name) + # Since they are not siblings, we allow them to have the same name. + self.assertEqual(family['cousin'].name, family['daughter'].name) def test_rename_d(self): family = self.setup_family() @@ -54,6 +56,12 @@ class UnitTesting(ViewLayerTesting): family['son'].name = family['daughter'].name self.assertNotEqual(family['son'].name, family['daughter'].name) + def test_rename_e(self): + family = self.setup_family() + + family['grandma'].name = family['grandpa'].name + self.assertNotEqual(family['grandma'].name, family['grandpa'].name) + def test_add_equal_name_a(self): family = self.setup_family() @@ -64,7 +72,14 @@ class UnitTesting(ViewLayerTesting): family = self.setup_family() other_aunt = family['grandma'].collections.new(family['daughter'].name) - self.assertNotEqual(other_aunt.name, family['daughter'].name) + # Since they are not siblings, we allow them to have the same name. + self.assertEqual(other_aunt.name, family['daughter'].name) + + def test_add_equal_name_c(self): + family = self.setup_family() + + other_aunt = family['grandma'].collections.new(family['mom'].name) + self.assertNotEqual(other_aunt.name, family['mom'].name) # ############################################################ |