~/talk

Testing asynchronous applications with FastAPI and pytest

Talkat PyCon AU 2023 · 2023-08-18..08-22· [testing, python]
links:none on file
slides:none on file

Shows concrete test code: unit tests use FastAPI test client with async mocks to avoid startup pubsub calls, end‑to‑end tests use pytest + httpx async client against a running server and a real redis pub/sub, creating a subscriber task, posting a user, asserting the broadcasted create event, then unsubscribing. Demonstrates kernelCI‑API backend, specific fixtures, async mock usage, ordered tests and that the pipeline passes when redis and the API are actually run.

AI-written summary · about

  1. 0:00Start
  2. 3:56What is Async programming?
  3. 11:51Unit test example
  4. 17:44E2E test example
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.