api: implement first server API + tests

This commit is contained in:
Mathieu Virbel
2023-08-04 18:16:37 +02:00
parent 20767fde3f
commit 96f52c631a
8 changed files with 327 additions and 23 deletions

View File

@@ -61,9 +61,9 @@ async def test_transcripts_list():
assert "testxx1" in names
assert "testxx2" in names
@pytest.mark.asyncio
async def test_transcript_delete():
async with AsyncClient(app=app, base_url="http://test/v1") as ac:
response = await ac.post("/transcripts", json={"name": "testdel1"})
assert response.status_code == 200
@@ -76,4 +76,3 @@ async def test_transcript_delete():
response = await ac.get(f"/transcripts/{tid}")
assert response.status_code == 404