This commit is contained in:
@@ -343,7 +343,16 @@ def test_ppt_audit_history_audit_rows_include_inline_replay(client, monkeypatch,
|
||||
result.fetchall.return_value = rows
|
||||
elif 'SELECT audited_at, pptx_filename' in sql:
|
||||
rows = [
|
||||
(datetime(2026, 5, 17, 22, 5), 'ocbot_daily_20260517.pptx', 'passed', 0, 0.93, 1200, '')
|
||||
(
|
||||
datetime(2026, 5, 17, 22, 5),
|
||||
'ocbot_daily_20260517.pptx',
|
||||
'failed',
|
||||
1,
|
||||
0.93,
|
||||
1200,
|
||||
'',
|
||||
[{'slide': 1, 'issues': ['⚠️ 圖表被切掉:右側圖例超出邊界']}],
|
||||
)
|
||||
]
|
||||
result.fetchall.return_value = rows
|
||||
elif 'COALESCE(AVG(confidence)' in sql:
|
||||
@@ -370,6 +379,7 @@ def test_ppt_audit_history_audit_rows_include_inline_replay(client, monkeypatch,
|
||||
assert '審核回放 · ocbot_daily_20260517.pptx' in html
|
||||
assert 'data-ppt-open-preview' in html
|
||||
assert 'ocbot_daily_20260517.pptx?action=pdf' in html
|
||||
assert '圖表被切掉' in html
|
||||
assert '回放' in html
|
||||
|
||||
|
||||
@@ -396,7 +406,7 @@ def test_ppt_audit_history_weekly_rows_include_visual_audit(client, monkeypatch,
|
||||
result.fetchall.return_value = []
|
||||
elif 'SELECT audited_at, pptx_filename' in sql:
|
||||
result.fetchall.return_value = [
|
||||
(datetime(2026, 5, 18, 22, 7), 'ocbot_weekly_20260518.pptx', 'passed', 0, 0.91, 1800, '')
|
||||
(datetime(2026, 5, 18, 22, 7), 'ocbot_weekly_20260518.pptx', 'passed', 0, 0.91, 1800, '', [])
|
||||
]
|
||||
elif 'COALESCE(AVG(confidence)' in sql:
|
||||
result.fetchone.return_value = (1, 1, 0, 0, 0, 0.91, 0)
|
||||
|
||||
Reference in New Issue
Block a user