'PUT requests to create a new object should not be able to set the id.'

def test_put_cannot_set_id(self):

    data = {u'id': 999, u'text': u'foobar'}
    request = factory.put(u'/1', data, format=u'json')
    with self.assertNumQueries(EXPECTED_QUERIES_FOR_PUT):
        response = self.view(request, pk=1).render()
    assert (response.status_code == status.HTTP_200_OK)
    assert (response.data == {u'id': 1, u'text': u'foobar'})
    updated = self.objects.get(id=1)
    assert (updated.text == u'foobar')
