Skip to content

Commit

Permalink
Test user upload delete in add_file_to_object func
Browse files Browse the repository at this point in the history
  • Loading branch information
ammar257ammar committed Dec 19, 2024
1 parent ef2eef4 commit b6e8f6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/tests/components_tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from grandchallenge.core.celery import _retry, acks_late_micro_short_task
from grandchallenge.notifications.models import Notification
from grandchallenge.reader_studies.models import InteractiveAlgorithmChoices
from grandchallenge.uploads.models import UserUpload
from tests.algorithms_tests.factories import (
AlgorithmFactory,
AlgorithmImageFactory,
Expand Down Expand Up @@ -536,6 +537,7 @@ def test_add_file_to_object(
linked_task=linked_task,
)

assert not UserUpload.objects.filter(pk=us.pk).exists()
assert ComponentInterfaceValue.objects.filter(interface=ci).count() == 1
assert "some_async_task" in str(callbacks)

Expand Down

0 comments on commit b6e8f6d

Please sign in to comment.