V3 step 1 update models.py and step 2 implement service/worker, and raw API response persistence

This commit is contained in:
Jim Lancaster
2026-08-08 18:08:04 -05:00
parent 5a741de0a9
commit 4dac9349c1
22 changed files with 373 additions and 51 deletions
+10
View File
@@ -23,6 +23,8 @@ class TestSourceModelProperties:
upload_name="page_one.png",
filename="stored_page_one.png",
file_path="/tmp/stored_page_one.png",
file_hash="b" * 64,
file_size_bytes=1,
)
assert source.latest_job_source is None
@@ -86,6 +88,8 @@ class TestSourcesPageRendering:
upload_name="page_one.png",
filename="stored_page_one.png",
file_path="/tmp/stored_page_one.png",
file_hash="c" * 64,
file_size_bytes=1,
)
)
await session.commit()
@@ -114,6 +118,8 @@ class TestSourcesPageRendering:
upload_name="target_page.png",
filename="target_stored.png",
file_path="/tmp/target_stored.png",
file_hash="d" * 64,
file_size_bytes=1,
),
Source(
document_id=other.id,
@@ -121,6 +127,8 @@ class TestSourcesPageRendering:
upload_name="other_page.png",
filename="other_stored.png",
file_path="/tmp/other_stored.png",
file_hash="e" * 64,
file_size_bytes=1,
),
]
)
@@ -240,6 +248,8 @@ class TestSourcesPageRendering:
upload_name="orphan-source.png",
filename="orphan-source.png",
file_path="/tmp/orphan-source.png",
file_hash="f" * 64,
file_size_bytes=1,
)
session.add(source)
await session.commit()