Coverage for src/app/ports/validation_port.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.7.0, created at 2025-04-02 22:46 +0200

1from abc import ABC, abstractmethod 

2 

3class ValidationPort(ABC): 

4 

5 @abstractmethod 

6 def get_user_by_email(self, email: str) -> bool: 

7 """ 

8 Get a user by email. 

9  

10 Args: 

11 email (str): The email of the user. 

12  

13 Returns: 

14 bool: True if the user exists, False otherwise. 

15 """ 

16 

17 

18 @abstractmethod 

19 def get_user_by_username(self, username: str) -> bool: 

20 """ 

21 Get a user by username. 

22  

23 Args: 

24 username (str): The username of the user. 

25  

26 Returns: 

27 bool: True if the user exists, False otherwise. 

28 """