Skip to content

[Week7 - hjy] Task4: Add comprehensive pagination and sorting tests#60

Open
HyungjoonYang wants to merge 1 commit into
mainfrom
week7-hjy-task4
Open

[Week7 - hjy] Task4: Add comprehensive pagination and sorting tests#60
HyungjoonYang wants to merge 1 commit into
mainfrom
week7-hjy-task4

Conversation

@HyungjoonYang

Copy link
Copy Markdown

Summary

  • Added 26 new test functions across test_notes.py and test_action_items.py
  • No production code changes — test-only task

Test plan

Notes tests (13 new):

  • Pagination: limit, skip, skip+limit, skip beyond total, page overlap, empty DB
  • Sorting: title asc/desc, created_at asc/desc, invalid field fallback
  • Search + pagination combo

Action items tests (13 new):

  • Pagination: limit, skip, skip+limit, skip beyond total, page overlap, empty DB
  • Sorting: description asc/desc, created_at asc/desc, invalid field fallback
  • Filter: completed=true with pagination, completed=false, no matches → empty
  • All 29 tests pass

Notable tradeoffs

  • Uses time.sleep(0.01) between creates for deterministic created_at ordering (SQLite datetime resolution)
  • Page overlap test verifies no duplicate IDs across pages (catches off-by-one in skip/limit)
  • Invalid sort field tests current fallback behavior rather than enforcing 400

🤖 Generated with Claude Code

Add 26 new tests for notes and action items covering:
pagination (limit, skip, skip+limit, page overlap, empty DB),
sorting (title/description/created_at asc/desc, invalid field fallback),
search+pagination combo, and completed filter+pagination.
No production code changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant