generated from john/python-template
V4.4 revision to facsimile print format
This commit is contained in:
@@ -107,7 +107,10 @@ async def test_document_print_projection_uses_semantic_author_and_current_text(d
|
||||
people = PeopleService(session_factory=default_session_factory)
|
||||
sources = SourceService(session_factory=default_session_factory)
|
||||
jobs = JobService(session_factory=default_session_factory)
|
||||
document = await documents.create_document(Document(name="Print Me", notes="Archive note"))
|
||||
document_type = await documents.create_document_type(label="Print Type")
|
||||
document = await documents.create_document(
|
||||
Document(name="Print Me", notes="Archive note", document_type_id=document_type.id)
|
||||
)
|
||||
person = await people.create_person(Person(full_name="Historic Author"))
|
||||
|
||||
async with people._session_scope() as session:
|
||||
@@ -160,6 +163,7 @@ async def test_document_print_projection_uses_semantic_author_and_current_text(d
|
||||
projection = await documents.read_document_print_projection(document.id)
|
||||
|
||||
assert projection.authors == ("Historic Author",)
|
||||
assert projection.document_type == "Print Type"
|
||||
assert [source.page_number for source in projection.sources] == [1, 2]
|
||||
assert [source.current_text for source in projection.sources] == ["raw first", "revised second"]
|
||||
assert [source.media_type for source in projection.sources] == ["image/png", "image/png"]
|
||||
|
||||
Reference in New Issue
Block a user