Skip to content

Commit c30ccac

Browse files
authored
Added a failing test for #4927
1 parent b936d82 commit c30ccac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_permissions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def test_empty_view_does_not_assert(self):
200200
response = empty_list_view(request, pk=1)
201201
self.assertEqual(response.status_code, status.HTTP_200_OK)
202202

203+
def test_calling_method_not_allowed(self):
204+
request = factory.generic('METHOD_NOT_ALLOWED', '/')
205+
response = object_permissions_list_view(request)
206+
self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
207+
203208

204209
class BasicPermModel(models.Model):
205210
text = models.CharField(max_length=100)

0 commit comments

Comments
 (0)