def METHOD_NAME(self, config_data: Dict[str, str], error_regexp: str) -> None:
    bot_class = type(get_bot_message_handler(self.bot_name))
    with self.assertRaisesRegex(ConfigValidationError, error_regexp):
        bot_class.validate_config(config_data)