def test_mark_notification_view_non_ajax_without_next_parameter(self):
        self.assertEqual(self.recipient.notifications.unread().count(),
                         self.recipient_nf_count)

        first_nf = self.recipient.notifications.first()
        first_nf_id = first_nf.id
        self.assertFalse(first_nf.read)

        # Marking as read.
        response = self.client.post(reverse('notifications:mark'),
                                    {'action': 'read', 'id': first_nf_id})
        self.assertRedirects(response, reverse('notifications:all'))

        nf = Notification.objects.get(pk=first_nf_id)
        self.assertTrue(nf.read)

        self.assertEqual(self.recipient.notifications.unread().count(),
                         1 - self.recipient_nf_count)

        # Marking as unread
        response_2 = self.client.post(reverse('notifications:mark'),
                                      {'action': 'unread', 'id': first_nf_id})
        self.assertRedirects(response_2, reverse('notifications:all'))
        nf_2 = Notification.objects.get(pk=first_nf_id)
        self.assertFalse(nf_2.read)
        self.assertEqual(self.recipient.notifications.unread().count(),
                         self.recipient_nf_count)
dataset/ETHPy150Open v1k45/django-notify-x/notify/tests/tests.py/NotificationViewTest.test_mark_notification_view_non_ajax_without_next_parameter/swapped operands of `-`