Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixtures+ tests #49

Merged
merged 9 commits into from
Nov 16, 2024
Merged

fixtures+ tests #49

merged 9 commits into from
Nov 16, 2024

Conversation

Zimovchik
Copy link
Member

@Zimovchik Zimovchik commented Nov 11, 2024

Изменения

  • добавлены фикстуры comment и lecturer для удобства написания тестов
  • написаны новые тесты и переписаны старые с использованием фикстур

Check-List

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

Copy link

💩 Code linting failed, use black and isort to fix it.

Copy link

github-actions bot commented Nov 11, 2024

Code Coverage

Coverage Report
FileStmtsMissCoverMissing
rating_api
   __main__.py440%1–7
   exceptions.py26388%35–36, 44
rating_api/models
   base.py55591%24–27, 76
   db.py63592%57–61
rating_api/routes
   comment.py661282%28, 34–37, 87, 93–98, 105, 127, 142
   exc_handlers.py20290%26, 33
   lecturer.py901781%106, 116–140, 143, 158, 166, 184, 190
rating_api/schemas
   base.py12467%6–9
TOTAL4395288% 

Summary

Tests Skipped Failures Errors Time
32 0 💤 0 ❌ 0 🔥 2.084s ⏱️

Copy link
Contributor

@parfenovma parfenovma left a comment

Choose a reason for hiding this comment

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

Вань, у тебя фикстуры используются как функции
тогда это уже не фикстуры получаются)

rating_api/utils/utils.py Outdated Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
@Zimovchik
Copy link
Member Author

перепишу

Copy link
Member

@Temmmmmo Temmmmmo left a comment

Choose a reason for hiding this comment

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

норм, комменты подправь(или ответь) и аппрувну

tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
tests/test_routes/test_comment.py Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
tests/test_routes/test_lecturer.py Outdated Show resolved Hide resolved
tests/test_routes/test_lecturer.py Outdated Show resolved Hide resolved
tests/test_routes/test_lecturer.py Outdated Show resolved Hide resolved
tests/test_routes/test_lecturer.py Outdated Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
tests/test_routes/test_lecturer.py Show resolved Hide resolved
tests/test_routes/test_comment.py Outdated Show resolved Hide resolved
@Temmmmmo
Copy link
Member

там еще тимур убрал регистрозависимость при поиске
тест на это тоже добавь))

@parfenovma parfenovma merged commit 6d34a33 into main Nov 16, 2024
2 checks passed
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.

Написать +- нормальные тесты для основных ручек
4 participants