def test_non_callable(self):
        with pytest.raises(TypeError) as excinfo:
            event.event(123)
        excinfo.match(r"Expected string, callable or None as first argument")

        with pytest.raises(TypeError) as excinfo:
            event.event("name")([])
        excinfo.match(r"Callable must be a function \(`def`\)"
                      r" or coroutine function \(`async def`\)")
def test_initial_object_with_valid_arguments_has_correct_properties(self):
        community_contribution_stats = (
            suggestion_registry.CommunityContributionStats(
                self.translation_reviewer_counts_by_lang_code,
                self.translation_suggestion_counts_by_lang_code,
                self.question_reviewer_count,
                self.question_suggestion_count
            )
        )
        community_contribution_stats.validate()

        self.assertEqual(
            (
                community_contribution_stats
                .translation_reviewer_counts_by_lang_code
            ),
            self.translation_reviewer_counts_by_lang_code)
        self.assertEqual(
            (
                community_contribution_stats
                .translation_suggestion_counts_by_lang_code
            ),
            self.translation_suggestion_counts_by_lang_code
        )
        self.assertEqual(
            community_contribution_stats.question_reviewer_count,
            self.question_reviewer_count
        )
        self.assertEqual(
            community_contribution_stats.question_suggestion_count,
            self.question_suggestion_count
        )