Skip to content

Commit

Permalink
update test patch path
Browse files Browse the repository at this point in the history
  • Loading branch information
crccheck committed Sep 9, 2024
1 parent 2e6c5fb commit 2d80a5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_object_actions/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_action_on_a_model_with_uuid_pk_works(self):
response = self.client.get(action_url)
self.assertRedirects(response, comment_url)

@patch("django_object_actions.utils.ChangeActionView.get")
@patch("django_object_actions.utils.ChangeActionView.dispatch")
def test_action_on_a_model_with_arbitrary_pk_works(self, mock_view):
mock_view.return_value = HttpResponse()
action_url = "/admin/polls/comment/{0}/actions/hodor/".format(" i am a pk ")
Expand All @@ -35,7 +35,7 @@ def test_action_on_a_model_with_arbitrary_pk_works(self, mock_view):
self.assertTrue(mock_view.called)
self.assertEqual(mock_view.call_args[1]["pk"], " i am a pk ")

@patch("django_object_actions.utils.ChangeActionView.get")
@patch("django_object_actions.utils.ChangeActionView.dispatch")
def test_action_on_a_model_with_slash_in_pk_works(self, mock_view):
mock_view.return_value = HttpResponse()
action_url = "/admin/polls/comment/{0}/actions/hodor/".format("pk/slash")
Expand Down

0 comments on commit 2d80a5b

Please sign in to comment.