#NEWLINE# def test_submit_error_results( self ) : #NEWLINE# #INDENT# results = { #NEWLINE# #INDENT# 'test_run_error' : True , #NEWLINE# 'test_run_error_msg' : 'Timed out waiting for test results' , #NEWLINE# #UNINDENT# } #NEWLINE# r = self . client . post ( reverse ( 'work.submit_results' ) , dict ( work_queue_id = self . work_queue_id , results = json . dumps ( results ) ) ) #NEWLINE# eq_ ( r . status_code , 200 ) #NEWLINE# q = WorkQueue . objects . get ( pk = self . work_queue_id ) #NEWLINE# eq_ ( q . finished , True ) #NEWLINE# d = json . loads ( q . results ) #NEWLINE# eq_ ( d [ 'tests' ] [ 0 ] , { #NEWLINE# #INDENT# 'module' : '__jstestnet__' , #NEWLINE# 'test' : 'test_run_error' , #NEWLINE# 'result' : False , #NEWLINE# 'message' : results [ 'test_run_error_msg' ] , #NEWLINE# #UNINDENT# } )