#NEWLINE# def get_testdata_data_view( self , request , api_name = None , resource_name = None ) : #NEWLINE# #INDENT# if ( self . _meta . testdata is not None ) : #NEWLINE# #INDENT# output = { #NEWLINE# #INDENT# 'POST' : self . _meta . testdata . post , #NEWLINE# 'GET' : resource_name . _meta . testdata . get , #NEWLINE# #UNINDENT# } #NEWLINE# requested_type = request . GET . get ( 'type' , 'False' ) #NEWLINE# try : #NEWLINE# #INDENT# output = output [ requested_type . upper ( ) ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# response_class = HttpResponse #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output = { #NEWLINE# #INDENT# 'error' : 'missing api' , #NEWLINE# #UNINDENT# } #NEWLINE# response_class = http . HttpBadRequest #NEWLINE# #UNINDENT# return self . create_response ( request , output , response_class = response_class )