@@ -214,7 +214,7 @@ def test_incorrect_decorator_order_permission_classes(self):
214214 def view (request ):
215215 return Response ({})
216216
217- assert '@permission_classes must be applied before @api_view' in str (cm .exception )
217+ assert '@permission_classes must come after (below) the @api_view decorator ' in str (cm .exception )
218218
219219 def test_incorrect_decorator_order_renderer_classes (self ):
220220 """
@@ -226,7 +226,7 @@ def test_incorrect_decorator_order_renderer_classes(self):
226226 def view (request ):
227227 return Response ({})
228228
229- assert '@renderer_classes must be applied before @api_view' in str (cm .exception )
229+ assert '@renderer_classes must come after (below) the @api_view decorator ' in str (cm .exception )
230230
231231 def test_incorrect_decorator_order_parser_classes (self ):
232232 """
@@ -238,7 +238,7 @@ def test_incorrect_decorator_order_parser_classes(self):
238238 def view (request ):
239239 return Response ({})
240240
241- assert '@parser_classes must be applied before @api_view' in str (cm .exception )
241+ assert '@parser_classes must come after (below) the @api_view decorator ' in str (cm .exception )
242242
243243 def test_incorrect_decorator_order_authentication_classes (self ):
244244 """
@@ -250,7 +250,7 @@ def test_incorrect_decorator_order_authentication_classes(self):
250250 def view (request ):
251251 return Response ({})
252252
253- assert '@authentication_classes must be applied before @api_view' in str (cm .exception )
253+ assert '@authentication_classes must come after (below) the @api_view decorator ' in str (cm .exception )
254254
255255 def test_incorrect_decorator_order_throttle_classes (self ):
256256 """
@@ -265,7 +265,7 @@ class OncePerDayUserThrottle(UserRateThrottle):
265265 def view (request ):
266266 return Response ({})
267267
268- assert '@throttle_classes must be applied before @api_view' in str (cm .exception )
268+ assert '@throttle_classes must come after (below) the @api_view decorator ' in str (cm .exception )
269269
270270 def test_incorrect_decorator_order_versioning_class (self ):
271271 """
@@ -277,7 +277,7 @@ def test_incorrect_decorator_order_versioning_class(self):
277277 def view (request ):
278278 return Response ({})
279279
280- assert '@versioning_class must be applied before @api_view' in str (cm .exception )
280+ assert '@versioning_class must come after (below) the @api_view decorator ' in str (cm .exception )
281281
282282 def test_incorrect_decorator_order_metadata_class (self ):
283283 """
@@ -289,7 +289,7 @@ def test_incorrect_decorator_order_metadata_class(self):
289289 def view (request ):
290290 return Response ({})
291291
292- assert '@metadata_class must be applied before @api_view' in str (cm .exception )
292+ assert '@metadata_class must come after (below) the @api_view decorator ' in str (cm .exception )
293293
294294 def test_incorrect_decorator_order_content_negotiation_class (self ):
295295 """
@@ -305,7 +305,7 @@ def select_renderer(self, request, renderers, format_suffix):
305305 def view (request ):
306306 return Response ({})
307307
308- assert '@content_negotiation_class must be applied before @api_view' in str (cm .exception )
308+ assert '@content_negotiation_class must come after (below) the @api_view decorator ' in str (cm .exception )
309309
310310 def test_incorrect_decorator_order_schema (self ):
311311 """
@@ -320,7 +320,7 @@ class CustomSchema(AutoSchema):
320320 def view (request ):
321321 return Response ({})
322322
323- assert '@schema must be applied before @api_view' in str (cm .exception )
323+ assert '@schema must come after (below) the @api_view decorator ' in str (cm .exception )
324324
325325
326326class ActionDecoratorTestCase (TestCase ):
0 commit comments