@@ -318,7 +318,7 @@ def has_permission(self, request, view):
318
318
319
319
320
320
class BasicPermWithDetail (permissions .BasePermission ):
321
- message = 'Custom: You cannot post to this resource'
321
+ message = 'Custom: You cannot access this resource'
322
322
323
323
def has_permission (self , request , view ):
324
324
return False
@@ -330,7 +330,7 @@ def has_object_permission(self, request, view, obj):
330
330
331
331
332
332
class BasicObjectPermWithDetail (permissions .BasePermission ):
333
- message = 'Custom: You cannot post to this resource'
333
+ message = 'Custom: You cannot access this resource'
334
334
335
335
def has_object_permission (self , request , view , obj ):
336
336
return False
@@ -371,7 +371,7 @@ def setUp(self):
371
371
User .
objects .
create_user (
'username' ,
'[email protected] ' ,
'password' )
372
372
credentials = basic_auth_header ('username' , 'password' )
373
373
self .request = factory .get ('/1' , format = 'json' , HTTP_AUTHORIZATION = credentials )
374
- self .custom_message = 'Custom: You cannot post to this resource'
374
+ self .custom_message = 'Custom: You cannot access this resource'
375
375
376
376
def test_permission_denied (self ):
377
377
response = denied_view (self .request , pk = 1 )
0 commit comments