def test_has_keys_values_and_items(self): d = PermaDict({'a': 'b', 'c': 'd'}) self.assertEqual(set(d.keys()), {'a', 'c'}) self.assertEqual(set(d.values()), {'b', 'd'}) self.assertEqual(set(d.items()), {('a', 'b'), ('c', 'd')})
def test_BasicPart(self): locations = PermaDict([('Cos', "Houston"), ('Bla', 1)]) assert list(locations) == ["Cos", "Bla"] assert list(locations.values()) == ["Houston", 1] assert list(locations.items()) == [('Cos', "Houston"), ('Bla', 1)]