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_validate_question_reviewer_count_fails_for_non_integer_count(
            self):
        community_contribution_stats = (
            suggestion_services.get_community_contribution_stats()
        )
        community_contribution_stats.question_reviewer_count = (
            self.non_integer_count
        )

        with self.assertRaisesRegex(
            utils.ValidationError,
            'Expected the question reviewer count to be an integer, '
            'received: %s.' % (
                community_contribution_stats.question_reviewer_count)
        ):
            community_contribution_stats.validate()