#NEWLINE# @ patch . object ( Collector , 'publish' ) #NEWLINE# def test_should_fail_gracefully( self , publish_mock ) : #NEWLINE# #INDENT# patch_urlopen = patch ( 'urllib2.urlopen' , Mock ( return_value = self . getFixture ( 'index.blank' ) ) ) #NEWLINE# patch_urlopen . start ( ) #NEWLINE# self . collector . collect ( ) #NEWLINE# patch_urlopen . stop ( ) #NEWLINE# self . assertPublishedMany ( self , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )