@override_settings(NOTIFY_SOFT_DELETE=False)
    def test_hard_delete_notification_view(self):
        self.assertEqual(self.recipient.notifications.all().count(),
                         self.recipient_nf_count)

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

        # Hard delete notification
        ctx = {'id': first_nf_id}
        response = self.client.post(reverse('notifications:delete'), ctx)
        self.assertRedirects(response, reverse('notifications:all'))

        self.assertRaises(Notification.DoesNotExist,
                          Notification.objects.get,
                          pk=first_nf_id)

        self.assertEqual(self.recipient.notifications.all().count(),
                         self.recipient_nf_count - 1)
dataset/ETHPy150Open v1k45/django-notify-x/notify/tests/tests.py/NotificationViewTest.test_hard_delete_notification_view/original