def test_keys_items_and_values(self): d = AttributeDict(a="ah", b="bh", c="ch") self.assertEqual(set(d.keys()), set(["a", "b", "c"])) self.assertEqual(set(d.values()), set(["ah", "bh", "ch"])) self.assertEqual(set(d.items()), set([("a", "ah"), ("b", "bh"), ("c", "ch")]))
def test_items(self): d = AttributeDict(a="a", b="b", c="c") another = AttributeDict() for k, v in d.items(): another[k] = v self.assertDictEqual(d, another)