From ea8b8414da9935ffe7e12f040e8fb43ae569a316 Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:54:07 +0000 Subject: [PATCH] Test user upload file delete on display set update --- app/tests/reader_studies_tests/test_views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/tests/reader_studies_tests/test_views.py b/app/tests/reader_studies_tests/test_views.py index e8fb23b58d..7acb584906 100644 --- a/app/tests/reader_studies_tests/test_views.py +++ b/app/tests/reader_studies_tests/test_views.py @@ -17,6 +17,7 @@ Question, ) from grandchallenge.subdomains.utils import reverse +from grandchallenge.uploads.models import UserUpload from tests.cases_tests import RESOURCE_PATH from tests.components_tests.factories import ( ComponentInterfaceFactory, @@ -568,6 +569,7 @@ def do_update(): user=user, method=client.post, ) + assert not UserUpload.objects.filter(pk=upload.pk).exists() assert response.status_code == 302 assert response.headers["HX-Redirect"] == reverse( "reader-studies:display_sets", kwargs={"slug": rs.slug}