Coverage for src/app/ports/update_message_rating_port.py: 100%
5 statements
« prev ^ index » next coverage.py v7.7.0, created at 2025-04-02 23:04 +0200
« prev ^ index » next coverage.py v7.7.0, created at 2025-04-02 23:04 +0200
1from abc import ABC, abstractmethod
2from models.message_model import MessageModel
4class UpdateMessageRatingPort(ABC):
5 """
6 UpdateMessageRatingPort is an interface for updating the rating of a message.
7 """
8 @abstractmethod
9 def update_message_rating(self, message: MessageModel) -> bool:
10 """
11 Update the rating of a message.
12 Args:
13 message (MessageModel): The message containing the ID and the new rating value.
14 Returns:
15 bool: True if the rating was successfully updated, False otherwise.
16 """