def METHOD_NAME(self, message, category="message"):
    """
    Checks if a given message was flashed.
    :param message: expected message
    :param category: expected message category
    """
    for _message, _category in self.flashed_messages:
        if _message == message and _category == category:
            return True
    raise AssertionError(f"Message '{message}' in category '{category}' wasn't flashed")