mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-18 21:15:16 +02:00
test truncated document processing titles
This commit is contained in:
parent
e195fb77c5
commit
79f9bd182b
1 changed files with 18 additions and 0 deletions
|
|
@ -61,3 +61,21 @@ def test_completion_failure():
|
|||
assert message == "Processing failed: bad"
|
||||
assert status == "failed"
|
||||
assert meta["processing_stage"] == "failed"
|
||||
|
||||
|
||||
def test_started_title_truncates_long_name():
|
||||
"""Very long filenames are truncated to fit the notification title column."""
|
||||
long_name = "a" * 250
|
||||
title = msg.started_title(long_name)
|
||||
assert len(title) <= 200
|
||||
assert title.startswith("Processing: ")
|
||||
assert title.endswith("...")
|
||||
|
||||
|
||||
def test_completion_truncates_long_name():
|
||||
"""Completion titles truncate long document names."""
|
||||
long_name = "b" * 250
|
||||
title, _, _, _ = msg.completion(long_name, document_id=1)
|
||||
assert len(title) <= 200
|
||||
assert title.startswith("Ready: ")
|
||||
assert title.endswith("...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue