case sensitive set dict keys

This commit is contained in:
Alessandro Ogier 2022-07-27 19:01:32 +02:00
parent 214a601916
commit 07ebb4a60b
2 changed files with 57 additions and 1 deletions

View file

@ -957,6 +957,39 @@ class TestBuilding(BaseEvenniaCommandTest):
"{'one': 99, 'three': 3, '+': 42, '+1': 33}",
)
# dict - case sensitive keys
self.call(
building.CmdSetAttribute(),
"Obj/test_case = {'FooBar': 1}",
"Created attribute Obj/test_case [category:None] = {'FooBar': 1}",
)
self.call(
building.CmdSetAttribute(),
"Obj/test_case['FooBar'] = 2",
"Modified attribute Obj/test_case [category:None] = {'FooBar': 2}",
)
self.call(
building.CmdSetAttribute(),
"Obj/test_case",
"Attribute Obj/test_case [category:None] = {'FooBar': 2}",
)
self.call(
building.CmdSetAttribute(),
"Obj/test_case['FooBar'] = {'BarBaz': 1}",
"Modified attribute Obj/test_case [category:None] = {'FooBar': {'BarBaz': 1}}",
)
self.call(
building.CmdSetAttribute(),
"Obj/test_case['FooBar']['BarBaz'] = 2",
"Modified attribute Obj/test_case [category:None] = {'FooBar': {'BarBaz': 2}}",
)
self.call(
building.CmdSetAttribute(),
"Obj/test_case",
"Attribute Obj/test_case [category:None] = {'FooBar': {'BarBaz': 2}}",
)
# tuple
self.call(
building.CmdSetAttribute(),