Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Nov 19, 2024
1 parent 39003cd commit a16a0e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions onadata/apps/api/tests/viewsets/test_data_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3810,6 +3810,15 @@ def test_submissions_deletion_in_progress(self):
response = view(request, pk=formid)
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 2)
# Cached submission ids saved as strings
cache.set(
f"xfm-submissions-deleting-{self.xform.pk}",
[str(instances[0].pk), str(instances[1].pk)],
)
request = self.factory.get("/", **self.extra)
response = view(request, pk=formid)
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.data), 2)

@override_settings(ENABLE_SUBMISSION_PERMANENT_DELETE=True)
@patch(
Expand Down

0 comments on commit a16a0e9

Please sign in to comment.