Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielGodoy01 committed Jul 4, 2024
1 parent eb462f9 commit ef4e8ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/infra/dtos/user_cognito_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def from_cognito(data: dict) -> "UserCognitoDTO":
# user_data["created_at"] = data.get("UserCreateDate")
# user_data["updated_at"] = data.get("UserLastModifiedDate")
user_data["enabled"] = f'{data.get("Enabled")}'
# user_data["status"] = f'{data.get("UserStatus")}'
user_data["status"] = f'{data.get("UserStatus")}'

return UserCognitoDTO(
user_id=str(user_data["user_id"]),
email=str(user_data["email"]),
name=str(user_data["name"]),
role = ROLE[user_data["role"]],
enabled=bool(user_data.get("enabled").lower() == "true"),
user_status=USER_STATUS.CONFIRMED
user_status=USER_STATUS[user_data["status"]],
)

def to_entity(self) -> User:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def test_get_user_by_email(self):
def test_get_all_users(self):
repo = UserRepositoryCognito()
repo.get_all_users()

assert 1 == 0

@pytest.mark.skip("Can't test it locally")
def test_update_user_enabled(self):
Expand Down

0 comments on commit ef4e8ef

Please sign in to comment.