generated from john/python-template
V3 step 1 update models.py and step 2 implement service/worker, and raw API response persistence
This commit is contained in:
@@ -39,6 +39,8 @@ class TestTranscriptionServiceRevisionUpsert:
|
||||
upload_name="source.jpg",
|
||||
filename="source.jpg",
|
||||
file_path="uploads/source.jpg",
|
||||
file_hash="1" * 64,
|
||||
file_size_bytes=1,
|
||||
)
|
||||
async with transcriptions._session_scope() as session:
|
||||
session.add(source)
|
||||
@@ -74,6 +76,8 @@ class TestTranscriptionServiceRevisionUpsert:
|
||||
upload_name="source.jpg",
|
||||
filename="source.jpg",
|
||||
file_path="uploads/source.jpg",
|
||||
file_hash="2" * 64,
|
||||
file_size_bytes=1,
|
||||
)
|
||||
async with transcriptions._session_scope() as session:
|
||||
session.add(source)
|
||||
@@ -115,6 +119,8 @@ class TestTranscriptionServiceRevisionUpsert:
|
||||
upload_name="delete.jpg",
|
||||
filename="delete.jpg",
|
||||
file_path=str(stored_path),
|
||||
file_hash="3" * 64,
|
||||
file_size_bytes=4,
|
||||
)
|
||||
async with transcriptions._session_scope() as session:
|
||||
session.add(source)
|
||||
@@ -149,6 +155,8 @@ class TestTranscriptionServiceRevisionUpsert:
|
||||
upload_name="shared.jpg",
|
||||
filename="shared.jpg",
|
||||
file_path="uploads/shared.jpg",
|
||||
file_hash="4" * 64,
|
||||
file_size_bytes=1,
|
||||
)
|
||||
async with transcriptions._session_scope() as session:
|
||||
session.add(source)
|
||||
@@ -180,6 +188,8 @@ class TestTranscriptionServiceRevisionUpsert:
|
||||
upload_name="orphan.jpg",
|
||||
filename="orphan.jpg",
|
||||
file_path=str(stored_path),
|
||||
file_hash="5" * 64,
|
||||
file_size_bytes=4,
|
||||
)
|
||||
await transcriptions.create_source(source=source)
|
||||
|
||||
@@ -207,6 +217,8 @@ class TestTranscriptionServiceRevisionUpsert:
|
||||
upload_name="linked.jpg",
|
||||
filename="linked.jpg",
|
||||
file_path="uploads/linked.jpg",
|
||||
file_hash="6" * 64,
|
||||
file_size_bytes=1,
|
||||
)
|
||||
async with transcriptions._session_scope() as session:
|
||||
session.add(source)
|
||||
|
||||
Reference in New Issue
Block a user