示例#1
0
 def test_has__path_arg__returns_False(self):
     a = NestedDict({"k1": {"k2": {"k3": "v"}}})
     self.assertFalse(a.has(("k1", "k2", "foo")))
示例#2
0
 def test_has__tuple_arg__returns_False(self):
     a = NestedDict({("k1", "k2", "k3"): "v"})
     self.assertFalse(a.has(("foo", )))
示例#3
0
 def test_has__returns_False(self):
     a = NestedDict()
     self.assertFalse(a.has())
示例#4
0
 def test_has__tuple_arg__returns_True(self):
     a = NestedDict({"k1": {"k2": {"k3": "v"}}})
     self.assertTrue(a.has(("k1", )))
示例#5
0
 def test_has__returns_True(self):
     a = NestedDict({"k": "v"})
     self.assertTrue(a.has())