Example #1
0
 def testSmartDeepDelItemWithDifferentSeparator(self):
     n = NestedDict(dict(one=dict(two='two')), separator=':')
     del n['one:two']
     self.assertEqual(n.keys(), ['one'])
     self.assertEqual(n['one'].keys(), [])
Example #2
0
 def testEmptyConstructor(self):
     n = NestedDict()
     self.assertEqual(n.keys(), [])
Example #3
0
 def testSmartDeepDelItem(self):
     n = NestedDict(dict(one=dict(two='two')))
     del n['one/two']
     self.assertEqual(n.keys(), ['one'])
     self.assertEqual(n['one'].keys(), [])
Example #4
0
 def testDirectDelItem(self):
     n = NestedDict(dict(one=dict(two='two')))
     del n['one']
     self.assertEqual(n.keys(), [])