def get_testdata_data_view(self, request, api_name=None,
        resource_name=None):

        if self._meta.testdata is not None:
            output = {
                    'POST': self._meta.testdata.post,
                    'GET': self._meta.testdata.get
            }

            requested_type = request.GET.get('type', 'False')
            try:
                output = output[requested_type.upper()]
            except __HOLE__:
                pass
            response_class = HttpResponse
        else:
            output = {
                    'error': 'missing api'
            }
            response_class = http.HttpBadRequest

        return self.create_response(request, output,
            response_class=response_class)
dataset/ETHPy150Open mozilla/inventory/vendor-local/src/django-tastytools/tastytools/resources.py/ModelResource.get_testdata_data_view