Skip to content

RU · in the original language

Первый запрос проходит, второй падает: почему TestClient ломает тесты FastAPI и как это исправить

Первый запрос к FastAPI возвращает 200, второй падает с ошибкой asyncpg. При этом под uvicorn всё работает. Причина может быть в событийных циклах, которыми управляет TestClient. Разберёмся, откуда бе…

Photo: Хабр
Хабр Russia · 21 October 2026

This is an extract. The full article is on Хабр.

Read at the source

Full text, translation and AI summary — after signing in

  • The full article in your language
  • AI summary and translation from the original
  • The same account works in the Suviy app

Free.

Comments

Sign in to join the conversation. Sign in

No comments yet.