test: add pytest infrastructure and poll() tests #4
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: peter/schiphol#4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Part of #1
What to build
Add
pytestandpytest-asyncioto the project's dev dependencies and write three tests that exercisepoll()in isolation using injected test doubles — no real HTTP calls, no real Kafka connection.The three tests are:
poll()publishes exactly N messages to the mock Kafka engine and returns N.link: rel="next"header pointing at the second),poll()publishes the combined Flight count from both pages and returns that total.get()raises an HTTP error,poll()propagates that exception to its caller.Acceptance criteria
pytestandpytest-asyncioare listed in the project's dev dependencies and installable viauv syncpytestcan be invoked and discovers the new testsBlocked by