def test_has__path_arg__returns_False(self): a = NestedDict({"k1": {"k2": {"k3": "v"}}}) self.assertFalse(a.has(("k1", "k2", "foo")))
def test_has__tuple_arg__returns_False(self): a = NestedDict({("k1", "k2", "k3"): "v"}) self.assertFalse(a.has(("foo", )))
def test_has__returns_False(self): a = NestedDict() self.assertFalse(a.has())
def test_has__tuple_arg__returns_True(self): a = NestedDict({"k1": {"k2": {"k3": "v"}}}) self.assertTrue(a.has(("k1", )))
def test_has__returns_True(self): a = NestedDict({"k": "v"}) self.assertTrue(a.has())