def test_items_dict(self): config = ConfigNode({'foo': 1, 'bar': 2}) compare(config.items(), expected=[('bar', 2), ('foo', 1)])
def test_items_wrapped_value(self): config = ConfigNode({'foo': [1]}) obj = tuple(config.items())[0][1] assert isinstance(obj, ConfigNode) compare(obj.data, expected=[1])
def test_items_list(self): config = ConfigNode([]) expected = "'list' object has no attribute 'items'" with ShouldRaise(AttributeError(expected)): tuple(config.items())