A permission change exposes fields on an anonymous response. Assert separate anonymous, owner and other-user payloads for a synthetic project detail endpoint.
An endpoint accepts unexpected content or oversized files. Accept a small image fixture with explicit size and supported-format checks, then reject malformed fixtures.
Partial updates accidentally replace fields the client never sent. Use a serializer with optional display name and nullable bio; compare omitted, null and empty string inputs.
A task observes an object before the database transaction is durable. Register an on_commit callback in a synthetic order flow and show commit and rollback outcomes.
Concurrent requests both pass the same application-level uniqueness check. Create a per-workspace unique slug constraint and show the IntegrityError path for competing inserts.
A serializer loads related records separately for every row. Create synthetic projects and owners, record query counts and compare select_related with prefetch_related.