Coverage for app/ddd/application/usecase/user/get_user_usecase.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-15 01:44 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-15 01:44 +0000
1from app.ddd.application.dto.user import (
2 GetUserInputDTO,
3 GetUserOutputDTO,
4)
5from app.ddd.application.usecase.user.base_user_usecase import (
6 BaseUserUseCase,
7)
8from app.ddd.domain import User, UserId
11class GetUserUseCase(BaseUserUseCase[GetUserInputDTO, GetUserOutputDTO]):
12 def execute(self, input_dto: GetUserInputDTO) -> GetUserOutputDTO:
13 user_id: UserId = UserId(root=input_dto.user_id)
14 user: User = self._uow.user_repository.find_by_id(user_id)
15 print("pass")
16 print(user.user_password)
17 return GetUserOutputDTO(user = user)