I have made a django application and am writing tests for it. In one of my views I'm manually throwing an exception:
raise Http404('Not authorised')
While writing test for that using django's built-in test framework(based on unittest).
TL;DR: Is there way to write test such that it makes sure that the view is indeed returning Http404
. ( assertEqual(response.status_code, 404
doesn't work)