DELETE requests to ListCreateAPIView should not be allowed
(self)
| 135 | assert response.data == {"detail": 'Method "PUT" not allowed.'} |
| 136 | |
| 137 | def test_delete_root_view(self): |
| 138 | """ |
| 139 | DELETE requests to ListCreateAPIView should not be allowed |
| 140 | """ |
| 141 | request = factory.delete('/') |
| 142 | with self.assertNumQueries(0): |
| 143 | response = self.view(request).render() |
| 144 | assert response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED |
| 145 | assert response.data == {"detail": 'Method "DELETE" not allowed.'} |
| 146 | |
| 147 | def test_post_cannot_set_id(self): |
| 148 | """ |