File: 0001-Fix-missing-annotations-on-mock-function.patch

package info (click to toggle)
python-django-object-actions 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 348 kB
  • sloc: python: 746; makefile: 61; sh: 6
file content (30 lines) | stat: -rw-r--r-- 1,205 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Michael Fladischer <fladi@debian.org>
Date: Fri, 28 Feb 2025 10:06:36 +0000
Subject: Fix missing annotations on mock function.

---
 django_object_actions/tests/test_admin.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/django_object_actions/tests/test_admin.py b/django_object_actions/tests/test_admin.py
index 70e268f..5ce9165 100644
--- a/django_object_actions/tests/test_admin.py
+++ b/django_object_actions/tests/test_admin.py
@@ -27,6 +27,8 @@ class CommentTests(LoggedInTestCase):
 
     @patch("django_object_actions.utils.ChangeActionView.dispatch")
     def test_action_on_a_model_with_arbitrary_pk_works(self, mock_view):
+        mock_view.__annotations__ = {}
+
         mock_view.return_value = HttpResponse()
         action_url = "/admin/polls/comment/{0}/actions/hodor/".format(" i am a pk ")
 
@@ -37,6 +39,8 @@ class CommentTests(LoggedInTestCase):
 
     @patch("django_object_actions.utils.ChangeActionView.dispatch")
     def test_action_on_a_model_with_slash_in_pk_works(self, mock_view):
+        mock_view.__annotations__ = {}
+
         mock_view.return_value = HttpResponse()
         action_url = "/admin/polls/comment/{0}/actions/hodor/".format("pk/slash")