refactor: update prerequisites queryset assignment in CaseCollectionForm and improve test assertions

This commit is contained in:
Ross
2026-06-10 21:20:30 +01:00
parent ddfb591921
commit 145aa442f0
3 changed files with 9 additions and 14 deletions
+3 -1
View File
@@ -131,7 +131,9 @@ def test_collection(db, create_case_collection, create_case, make_case, client,
# Check that sorting the exam works
# First attempt is not logged in
assertRedirects(response, f"{reverse('login')}?next=%2Fatlas%2Fcollection%2F1%2Fjson_edit")
from urllib.parse import quote
expected_next = quote(reverse("atlas:exam_json_edit", kwargs={"pk": collection.pk}))
assertRedirects(response, f"{reverse('login')}?next={expected_next}")
client.force_login(create_user)