Saya mencoba membuat UnitTest untuk memverifikasi bahwa sebuah objek telah dihapus.
from django.utils import unittest
def test_z_Kallie_can_delete_discussion_response(self):
...snip...
self._driver.get("http://localhost:8000/questions/3/want-a-discussion")
self.assertRaises(Answer.DoesNotExist, Answer.objects.get(body__exact = '<p>User can reply to discussion.</p>'))
Saya terus mendapatkan kesalahan:
DoesNotExist: Answer matching query does not exist.