Jul 17 - Fill the gaps between Single-tenant mode and Multi-tenant mode - MT4

This commit is contained in:
2026-07-17 11:36:05 -04:00
parent 253291d5a4
commit d44d761706
10 changed files with 565 additions and 19 deletions
+7 -1
View File
@@ -67,7 +67,13 @@ def test_cron_materialises_due_schedule_and_notifies(client):
resp = client.post('/inspection-schedules/run', data={'token': 'test-digest'})
assert resp.status_code == 200
assert resp.get_json() == {'ok': True, 'due': 1, 'created': 1}
# phase43 widened this response with a 'reminders' key (plan-mode schedules).
# Materialisation of 'auto' schedules is unchanged.
payload = resp.get_json()
assert payload['ok'] is True
assert payload['due'] == 1
assert payload['created'] == 1
assert payload['reminders'] == {'advance': 0, 'due': 0, 'overdue': 0}
# A real in_progress inspection now exists for the assigned inspector.
insp = Inspection.query.filter_by(inspector_id=insp_user_id).first()