Skip to content

Commit

Permalink
pylint beauty
Browse files Browse the repository at this point in the history
  • Loading branch information
patroqueeet committed Aug 26, 2024
1 parent 1e84473 commit 39aa7e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion django_walletpass/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def delete_registration(
notification_request=None,
notification_result=None,
**kwargs
):
): # noqa: W0613
if notification_result.status == APNS_RESPONSE_CODE.GONE:
registration = Registration.objects.get(
push_token=notification_request.device_token
Expand Down
4 changes: 2 additions & 2 deletions django_walletpass/tests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_send_notification_registration_gone(
class SignalTestCase(TestCase):
@mock.patch("django_walletpass.signals.Registration")
@mock.patch("django_walletpass.signals.PASS_UNREGISTERED")
def test_delete_registration(self, PASS_UNREGISTERED_mock, registration_mock):
def test_delete_registration(self, pass_unregistered_mock, registration_mock):
"""signal handler must delete registration and trigger signal"""
request_mock, response_mock = mock.Mock(), mock.Mock()
response_mock.is_successful = False
Expand All @@ -187,7 +187,7 @@ def test_delete_registration(self, PASS_UNREGISTERED_mock, registration_mock):
# Registration obj must be deleted
registration_mock.objects.get.return_value.delete.assert_called_with()
# Signal must be sent
PASS_UNREGISTERED_mock.send.assert_called()
pass_unregistered_mock.send.assert_called()


class RegisterPassViewSetTestCase(APITestCase):
Expand Down

0 comments on commit 39aa7e9

Please sign in to comment.