#NEWLINE# def test_missing_results( self ) : #NEWLINE# #INDENT# results = { #NEWLINE# #INDENT# 'failures' : 0 , #NEWLINE# 'total' : 1 , #NEWLINE# 'tests' : [ { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# r = self . client . post ( reverse ( 'work.submit_results' ) , dict ( work_queue_id = self . work_queue_id , results = json . dumps ( self ) ) ) #NEWLINE# eq_ ( r . status_code , 500 ) #NEWLINE# d = json . loads ( r . content ) #NEWLINE# eq_ ( d [ 'error' ] , True ) #NEWLINE# assert ( 'missing key result' in d [ 'message' ] ) , ( 'Unexpected: %s' % d [ 'message' ] )