def test_02_delete_single_orphan(self):
     old_info = Orphans.info(self.pulp)
     rpm_orphans = RpmOrphan.list(self.pulp)
     assert rpm_orphans, "No orphans found; there might be other 'Zoo' repos in %s" % self.pulp
     rpm_orphans[0].delete(self.pulp)
     del rpm_orphans[0]
     self.assertPulpOK()
     new_info = Orphans.info(self.pulp)
     self.assertEqual(old_info['rpm']['count'], new_info['rpm']['count'] + 1)
     self.assertEqual(
         sorted(map(lambda x: x.data['name'], rpm_orphans)),
         sorted(map(lambda x: x.data['name'], RpmOrphan.list(self.pulp)))
     )
 def test_02_delete_single_orphan(self):
     old_info = Orphans.info(self.pulp)
     rpm_orphans = RpmOrphan.list(self.pulp)
     assert rpm_orphans, "No orphans found; there might be other 'Zoo' repos in %s" % self.pulp
     response = rpm_orphans[0].delete(self.pulp)
     Task.wait_for_report(self.pulp, response)
     del rpm_orphans[0]
     self.assertPulpOK()
     new_info = Orphans.info(self.pulp)
     self.assertEqual(old_info['rpm']['count'], new_info['rpm']['count'] + 1)
     self.assertEqual(
         sorted(map(lambda x: x.data['name'], rpm_orphans)),
         sorted(map(lambda x: x.data['name'], RpmOrphan.list(self.pulp)))
     )
 def test_01_view_orphaned_content_by_type(self):
     rpm_orphans = RpmOrphan.list(self.pulp)
     self.assertPulpOK()
     all_orphans = Orphans.info(self.pulp)
     self.assertEqual(len(rpm_orphans), all_orphans['rpm']['count'])
 def test_05_delete_individual_orphan(self):
     rpm_orphans = RpmOrphan.list(self.pulp)
     unit_id = rpm_orphans[0]
     response = unit_id.delete(self.pulp)
     self.assertPulpOK()
     Task.wait_for_report(self.pulp, response)