Spaces:
Running
Running
Download tests/conftest.py from sathvik77/MusicUtils: direct link, hf CLI and curl.
- Browser
- Download file 312 Bytes
-
https://huggingface.co/spaces/sathvik77/MusicUtils/resolve/main/tests/conftest.py
- Command line
-
hf download hf://spaces/sathvik77/MusicUtils/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/sathvik77/MusicUtils/resolve/main/tests/conftest.py
312 Bytes
| import pytest | |
| from asgi_lifespan import LifespanManager | |
| from httpx import AsyncClient, ASGITransport | |
| from main import app | |
| async def client(): | |
| async with LifespanManager(app): | |
| async with AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as c: | |
| yield c | |