Fixed Form Vlidation

This commit is contained in:
Shubhankar45
2026-09-22 10:36:55 +00:00
parent 8fdd20b29f
commit 2ed3945b5d
2435 changed files with 892940 additions and 32 deletions
+3 -1
View File
@@ -94,8 +94,10 @@ class TestFormApproval:
state = _by_table(await client.get(f"{API}/approvals", headers=auth["mr1"]))["fare_chart"]
assert state["status"] == "draft" and state["approved_by_name"] is None
# A pending (not yet approved) form is withdrawn too, so the AM never signs stale data.
# Deleting a row is admin-only — an MR can no longer delete their own rows.
await client.post(f"{API}/fare_chart/approval/request", headers=auth["mr1"])
assert (await client.delete(f"{API}/fare_chart/rows/{row_id}", headers=auth["mr1"])).status_code == 204
assert (await client.delete(f"{API}/fare_chart/rows/{row_id}", headers=auth["mr1"])).status_code == 403
assert (await client.delete(f"{API}/fare_chart/rows/{row_id}", headers=auth["admin"])).status_code == 204
assert (await client.get(f"{API}/approvals", headers=auth["am1"])).json() == [] # withdrawn: nothing left for the AM
async def test_the_pdf_signature_comes_from_the_server_not_the_browser(self, client, auth, org, db, fare_chart):