Skip to content

Conversation

@ArtemBratyashin
Copy link
Contributor

@ArtemBratyashin ArtemBratyashin commented Nov 11, 2025

Изменения

Добавил в get_comments получение фамилии и имени комментатора.

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить форматирование black и isort для Back-End или Prettier для Front-End?

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Code Coverage

Coverage Report
FileStmtsMissCoverMissing
rating_api
   __main__.py440%1–7
   exceptions.py43784%35–37, 48–50, 58
rating_api/models
   base.py64494%24–27
   db.py1501292%115, 117, 119, 121, 132, 170, 188, 198, 212, 221–223
rating_api/routes
   base.py16194%41
   comment.py1323375%64, 82, 124–125, 146–155, 225–226, 228–229, 237–242, 253–255, 282, 295, 322–333, 364
   exc_handlers.py32391%36, 43, 50
   lecturer.py103991%70–71, 81, 87–88, 207, 215, 233, 239
rating_api/schemas
   base.py12467%6–9
   models.py153398%187, 189, 199
rating_api/utils
   mark.py880%1–20
TOTAL7518888% 

Summary

Tests Skipped Failures Errors Time
77 0 💤 0 ❌ 2 🔥 23.226s ⏱️

result.total = len(result.comments)
result.comments = [comment_validator.model_validate(comment) for comment in result.comments]

# Получаем ФИО пользователя
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

забирать имя из юзердаты при создании комментария, а не при выводе

lecturer_id: int
like_count: int
dislike_count: int
user_full_name: str | None = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

поменять на user_fullname название

assert getattr(nonanonymous_comment, k, None) == v # Есть ли изменения в БД


@pytest.mark.parametrize("is_own_comment", [True, False])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

здесь все неправильно
фикстуры user нет в test/conftest.py из-за этого вылетает ошибка при использовании pytest

@ArtemBratyashin ArtemBratyashin deleted the add_user_name_for_comment branch November 18, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Добавить ФИ юзера в выдачу инфы о комменте

3 participants