Skip to content

Update/test for get items#152

Merged
petrCher merged 7 commits into
mainfrom
update/test_for_get_items
May 9, 2026
Merged

Update/test for get items#152
petrCher merged 7 commits into
mainfrom
update/test_for_get_items

Conversation

@CaseAsLimbo
Copy link
Copy Markdown
Contributor

@CaseAsLimbo CaseAsLimbo commented May 7, 2026

Изменения

  • Обновлены тесты, для ручки get_items
  • Проверены на актуальность тесты test_item.py
    • Добавлен test_get_items_various_filters для набора общих позитивных тестов
    • Добавлены тесты для проверки правильности сортировки возвращаемых в ответе item-ов
      • test_get_items_check_order
  • Добавлена новая фикстура items_with_different_types

Детали реализации

  • items_with_different_types создаёт 6 item-ов с попарно одинаковыми type_id, но разными is_available

Check-List

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

…авильности сортировки item-ов. В conftest.py добавлена фикстура, создающая 6 разных item-ов, образующих пары по одинаковым type_id, но разными is_available
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Summary

Tests Skipped Failures Errors Time
154 0 💤 0 ❌ 0 🔥 20.143s ⏱️

@CaseAsLimbo CaseAsLimbo requested a review from petrCher May 7, 2026 18:00
@CaseAsLimbo CaseAsLimbo linked an issue May 7, 2026 that may be closed by this pull request
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/test_routes/test_item.py Outdated
Comment thread tests/conftest.py
@petrCher
Copy link
Copy Markdown
Member

petrCher commented May 7, 2026

Проверил же остальные тесты? На другие эндпоинты

…tems_various_filters. В test_get_items_various_filters добавлена проверкана количество возвращаемых объектов. Так же вместо фикстуры items_with_types теперь используется фикстура items_with_different_types. Тесты проверки порядка сортировки объединины в один, test_get_items_check_order и добавлена логика проверки asc порядка item-ов.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

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

@CaseAsLimbo CaseAsLimbo requested a review from petrCher May 8, 2026 21:21
Comment thread tests/conftest.py
@petrCher petrCher merged commit 9ab4896 into main May 9, 2026
2 checks passed
@petrCher petrCher deleted the update/test_for_get_items branch May 9, 2026 07:48
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.

test item

2 participants