#NEWLINE# @ mock . patch ( 'olympia.devhub.tasks.run_validator' ) #NEWLINE# def test_compat_result_report( self , run_validator ) : #NEWLINE# #INDENT# run_validator . return_value = self . compatibility_result #NEWLINE# data = self . upload ( ) #NEWLINE# poll_url = self . poll_upload_status_url ( data [ 'upload' ] ) #NEWLINE# res = self . client . get ( poll_url ) #NEWLINE# data = json . loads ( res . content ) #NEWLINE# res = self . client . get ( data [ 'full_report_url' ] ) #NEWLINE# assert ( res . status_code == 200 ) #NEWLINE# assert ( res . context [ 'result_type' ] == 'compat' ) #NEWLINE# doc = pq ( res . content ) #NEWLINE# assert ( doc ( 'table tr td:eq(0)' ) . text ( ) == 'Firefox 3.7a1pre' ) #NEWLINE# assert ( res . context [ 'validate_url' ] == poll_url )