music on atproto
plyr.fm
tests#
pytest with async support.
critical rules:
- NEVER use
@pytest.mark.asyncio- pytest is configured withasyncio_mode = "auto" - all fixtures and test parameters MUST be type hinted
just testruns with isolated postgres per worker (xdist)
structure:
api/- endpoint tests using TestClientutilities/- unit tests for hashing, config, etcconftest.py- shared fixtures (db session, test client, mock auth)
adding tests:
- always add regression test when fixing bugs
- use
mock_auth_sessionfixture for authenticated endpoints - check existing tests for patterns before writing new ones