def test_iter(self):
        prio_set_list = event._PrioritizedSetList()
        objs = [(i,) for i in range(5)]
        for i, obj in enumerate(objs):
            prio_set_list.add(-i, obj)

        for i, set_ in enumerate(prio_set_list):
            assert set_ == (-i, {objs[i]})
def test_validation_for_handled_application_with_invalid_final_review(self):
        self.assertEqual(
            self.voiceover_application.status,
            suggestion_models.STATUS_IN_REVIEW)
        self.assertEqual(self.voiceover_application.final_reviewer_id, None)
        self.voiceover_application.validate()

        self.voiceover_application.status = suggestion_models.STATUS_ACCEPTED
        with self.assertRaisesRegex(
            utils.ValidationError, 'Expected final_reviewer_id to be a string'
        ):
            self.voiceover_application.validate()