#NEWLINE# @ mock . patch ( 'nova.image.glance.LOG' ) #NEWLINE# @ mock . patch ( 'nova.image.glance.GlanceImageService.show' ) #NEWLINE# @ mock . patch ( 'nova.signature_utils.get_verifier' ) #NEWLINE# def test_download_with_invalid_signature( self , mock_get_verifier , mock_show , mock_log ) : #NEWLINE# #INDENT# mock_get_verifier . return_value = self . BadVerifier ( ) #NEWLINE# mock_show . return_value = self . fake_img_props #NEWLINE# self . assertRaises ( cryptography . exceptions . InvalidSignature , self . service . download , context = None , image_id = None , data = None , dst_path = None ) #NEWLINE# mock_log . error . assert_called_once_with ( mock . ANY , mock . ANY )