From 2f495cf12a87805cfb36e8e0e531ce9ebe59442b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Anh=20B=C3=ACnh?= Date: Sat, 16 Mar 2024 03:46:20 +0700 Subject: [PATCH] - Update the message to be consistent with the Django `HttpResponseBase` class. --- rest_framework/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/views.py b/rest_framework/views.py index 4c30029fd..411c1ee38 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -421,7 +421,7 @@ class APIView(View): """ # Make the error obvious if a proper response is not returned assert isinstance(response, HttpResponseBase), ( - 'Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` ' + 'Expected a `Response`, `HttpResponse` or `StreamingHttpResponse` ' 'to be returned from the view, but received a `%s`' % type(response) )