'Create 3 BasicModel instances.'

def setUp(self):

    items = [u'foo', u'bar', u'baz']
    for item in items:
        BasicModel(text=item).save()
    self.objects = BasicModel.objects
    self.data = [{u'id': obj.id, u'text': obj.text} for obj in self.objects.all()]
    class OverriddenGetObjectView(generics.RetrieveUpdateDestroyAPIView, ):
        u'\n                                                Example    detail    view    for    override    of    get_object().\n                                                '
        serializer_class = BasicSerializer
        def get_object(self):
            pk = int(self.kwargs[u'pk'])
            return get_object_or_404(BasicModel.objects.all(), id=pk)
    self.view = OverriddenGetObjectView.as_view()
