'POST requests to RetrieveUpdateDestroyAPIView should not be allowed'

def test_post_instance_view(self):

    data = {u'text': u'foobar'}
    request = factory.post(u'/', data, format=u'json')
    with self.assertNumQueries(0):
        response = self.view(request).render()
    assert (response.status_code == status.HTTP_405_METHOD_NOT_ALLOWED)
    assert (response.data == {u'detail': u'Method    "POST"    not    allowed.'})
