Skip to content

Commit

Permalink
Merge branch 'main' into workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse-reeve authored Nov 8, 2023
2 parents dda5295 + d7f6fd6 commit 9e8f064
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import os
import tempfile
from unittest.mock import patch # pylint: disable=ungrouped-imports

from django import forms
from django.contrib.admin.sites import AdminSite
Expand Down Expand Up @@ -309,7 +310,8 @@ def test_image_resubmit_save_admin(self):
setattr(resubmit_req, "_messages", messages)
resubmit_req.user = self.user
resubmit_req._dont_enforce_csrf_checks = True
saved_obj = testadmin.add_view(resubmit_req) # <=== BUG here
with patch("django.contrib.admin.models.LogEntryManager.log_action"):
saved_obj = testadmin.add_view(resubmit_req) # <=== BUG here
self.assertEqual(saved_obj.admin_upload_image.read(), PNG)
self.assertEqual(1, 1)

Expand All @@ -332,6 +334,7 @@ def test_file_resubmit_save_admin(self):
setattr(resubmit_req, "_messages", messages)
resubmit_req.user = self.user
resubmit_req._dont_enforce_csrf_checks = True
saved_obj = testadmin.add_view(resubmit_req) # <=== BUG here
with patch("django.contrib.admin.models.LogEntryManager.log_action"):
saved_obj = testadmin.add_view(resubmit_req) # <=== BUG here
self.assertEqual(saved_obj.admin_upload_file.read(), self.temporary_content)
self.assertEqual(1, 1)

0 comments on commit 9e8f064

Please sign in to comment.