def METHOD_NAME(self):
    repomd = cr.Repomd(REPO_01_REPOMD)
    types = []
    for rec in repomd:
        types.append(rec.type)
    self.assertEqual(types, ['filelists', 'other', 'primary'])
    rec = repomd["primary"]
    self.assertEqual(rec.type, "primary")
    self.assertRaises(KeyError, repomd.__getitem__, "foobar")
    self.assertTrue("primary" in repomd)