sanic-testing
sanic-testing copied to clipboard
Test clients for Sanic
**Motivation:** The SanicASGITestClient class provides only a client that lifts a new instance of the test application for each request. This is very expensive and time-consuming. The application I'm trying...
How to reproduce ```python import pytest from sanic_testing.reusable import ReusableClient from sanic import Sanic from sanic import response @pytest.fixture(scope="session") def app(): sanic_app = Sanic("TestSanic") @sanic_app.get("/") def basic(request): return response.text("foo") @sanic_app.post("/api/login")...
I am trying to test app with TortoiseORM and i dont understand what is the right way to setup my test application in fixture. I was tried to make with...
Extend sanic-testing with tox tests to ensure python 3.12 is support by the library
`Sanic-testing` uses `httpx` under the hood, which makes monkeypatching httpx requests hard to implement. For example if we have and endpoint which makes external requests, and if we monkeypatch this...
The type annotation of Sanic app's `test_client` currently is `Any`. Create a better type for it can make test dev experience better. I think adding a parent class, either abstract...
I'm experiencing an issue while testing a Sanic application asynchronously using pytest. According to the Sanic documentation, the SanicASGITestClient should not spin up a server on every request. However, in...