Coverage for app/ddd/application/usecase/user/base_user_usecase.py: 100%

13 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-01-15 01:44 +0000

1from app.core.base.base_usecase import ( 

2 BaseInputDTOType, 

3 BaseOutputDTOType, 

4 BaseUsecase, 

5) 

6from app.ddd.application.uow import UserUnitOfWork 

7from app.ddd.domain.factory import TokenFactory 

8from app.ddd.domain.service import AuthService 

9from app.ddd.infrastructure.factory import TokenFactoryImpl 

10from app.ddd.infrastructure.service import AuthServiceImpl 

11 

12TOKEN_FACTORY = TokenFactoryImpl() 

13AUTH_SERVICE = AuthServiceImpl() 

14 

15class BaseUserUseCase(BaseUsecase[BaseInputDTOType, BaseOutputDTOType]): 

16 def __init__( 

17 self, 

18 uow: UserUnitOfWork, 

19 # auth_payload, 

20 token_factory: TokenFactory = TOKEN_FACTORY, 

21 auth_service: AuthService = AUTH_SERVICE, 

22 ) -> None: 

23 self._uow = uow 

24 # self._auth_payload = auth_payload 

25 self.token_factory = token_factory 

26 self.auth_service = auth_service 

27 

28 

29