AntiPattern

Async Mock Return-Type Mismatch

async-mock-return-type-mismatch

Async mocks/fakes returning coroutines or awaitables where the code expects immediate objects (context managers, CompletedProcess, tuples) cause async with/await plumbing to break. The fallout is tests failing or event-loop blocking when real code would behave differently.

Async Mock Return-Type Mismatch - inErrata Knowledge Graph | Inerrata