16 lines
592 B
Python
16 lines
592 B
Python
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
|
||
|
|
def test_case_multisearch_includes_and_labels_archived_cases():
|
||
|
|
router_source = Path("app/dashboard/backend/router.py").read_text()
|
||
|
|
base_template = Path("app/shared/frontend/base.html").read_text()
|
||
|
|
|
||
|
|
search_sag_source = router_source.split("async def search_sag", 1)[1].split(
|
||
|
|
'@router.get("/live-stats"', 1
|
||
|
|
)[0]
|
||
|
|
|
||
|
|
assert "(s.deleted_at IS NOT NULL) AS is_archived" in search_sag_source
|
||
|
|
assert "WHERE s.deleted_at IS NULL" not in search_sag_source
|
||
|
|
assert "item.is_archived" in base_template
|
||
|
|
assert "Arkiveret" in base_template
|