fix transcript delete

This commit is contained in:
Sara
2023-12-06 17:10:48 +01:00
parent b70ff46c72
commit 6fe61cd5e3
2 changed files with 17 additions and 1 deletions

View File

@@ -118,3 +118,16 @@ async def test_transcript_audio_download_range_with_seek(
assert response.status_code == 206
assert response.headers["content-type"] == content_type
assert response.headers["content-range"].startswith("bytes 100-")
@pytest.mark.asyncio
async def test_transcript_delete_with_audio(fake_transcript):
from reflector.app import app
ac = AsyncClient(app=app, base_url="http://test/v1")
response = await ac.delete(f"/transcripts/{fake_transcript.id}")
assert response.status_code == 200
assert response.json()["status"] == "ok"
response = await ac.get(f"/transcripts/{fake_transcript.id}")
assert response.status_code == 404