style: Indicate deleted accounts on requests page

Show "(deleted)" on requests page for user accounts that were removed.

Fixes #505

Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
moson 2024-06-24 16:35:21 +02:00
parent ed878c8c5e
commit 33d31d4117
No known key found for this signature in database
GPG key ID: 4A4760AB4EE15296
2 changed files with 15 additions and 2 deletions

View file

@ -834,6 +834,16 @@ def test_requests(
rows = root.xpath('//table[@class="results"]/tbody/tr')
assert len(rows) == 5 # There are five records left on the second page.
# Delete requesters user account and check output
with db.begin():
db.delete(requests[0].User)
with client as request:
request.cookies = cookies
resp = request.get("/requests")
assert "(deleted)" in resp.text
def test_requests_with_filters(
client: TestClient,