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(), [])
def testEmptyConstructor(self): n = NestedDict() self.assertEqual(n.keys(), [])
def testSmartDeepDelItem(self): n = NestedDict(dict(one=dict(two='two'))) del n['one/two'] self.assertEqual(n.keys(), ['one']) self.assertEqual(n['one'].keys(), [])
def testDirectDelItem(self): n = NestedDict(dict(one=dict(two='two'))) del n['one'] self.assertEqual(n.keys(), [])