#NEWLINE# @ unit_testing_only #NEWLINE# def spoof_submission( submit_url , body ) : #NEWLINE# #INDENT# client = Client ( ) #NEWLINE# f = StringIO ( body . encode ( 'utf-8' ) ) #NEWLINE# f . name = 'form.xml' #NEWLINE# response = client . post ( f , { #NEWLINE# #INDENT# 'xml_submission_file' : f , #NEWLINE# #UNINDENT# } ) #NEWLINE# try : #NEWLINE# #INDENT# return response [ 'X-CommCareHQ-FormID' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# return None