All quizzesHard
Async, Lifespan & Database Tests — Series 3
Preview — 3 of 10 questions
An async test passes with HTTPX ASGITransport but production startup fails. What test gap is likely?
AThe test did not run the app lifespan
BThe test used an HTTP method
CThe test asserted JSON content
DThe endpoint had a response model
A test for request-scoped cleanup asserts only the route response. What else should it observe?
AThe source file was reformatted
BThe dependency resource was closed after the request
CThe client became a database engine
DThe route was removed from OpenAPI
A DB test changes the dependency override while another parallel test shares the same app object. What risk follows?
AFastAPI automatically creates a separate app per pytest worker
BThe schema is guaranteed to roll back
CRequests can observe the wrong override from shared mutable app state
DOnly static type checking changes
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.