def validate_error_on_unauthenticated(self, url_shortcut: str, request: Callable[[str], WSGIRequest],
url_shortcut_args=[]):
url = reverse(url_shortcut, args=url_shortcut_args)
response = request(url)
self.assertEqual(response.status_code, HTTP_403_FORBIDDEN)
self.assertEqual(response.json(),
{'detail': 'Authentication credentials were not provided.'})
评论列表
文章目录