def test_delattr_nested(self): items = AttrDict() items.a = dict(b=4, c=7) del items.a.c assert 'b' in items.a assert 'c' not in items.a
def test_delattr(self): items = AttrDict() items.a = 4 del items.a assert 'a' not in items
def test_setattr_getattr(self): items = AttrDict() items.a = 4 assert items.a == 4
def test_setattr_getattr_nested(self): items = AttrDict() items.a = dict(b=4, c=7) assert items.a.b == 4
def test_init(self): items = AttrDict() assert items.keys() == []