#NEWLINE# @ mock . patch ( 'solum.common.clients.OpenStackClients.keystone' ) #NEWLINE# def test_trigger_workflow_verify_artifact_failed( self , mock_kc , mock_registry ) : #NEWLINE# #INDENT# trigger_id = 1 #NEWLINE# plan_obj = fakes . FakePlan ( ) #NEWLINE# artifacts = [ { #NEWLINE# #INDENT# 'name' : 'Test' , #NEWLINE# 'artifact_type' : 'heroku' , #NEWLINE# 'content' : { #NEWLINE# #INDENT# 'href' : 'https://github.com/some/project' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'language_pack' : 'auto' , #NEWLINE# #UNINDENT# } ] #NEWLINE# plan_obj . raw_content = { #NEWLINE# #INDENT# 'artifacts' : artifacts , #NEWLINE# #UNINDENT# } #NEWLINE# mock_registry . Plan . get_by_trigger_id . return_value = plan_obj #NEWLINE# handler = plan_handler . PlanHandler ( self . ctx ) #NEWLINE# handler . _build_artifact = mock . MagicMock ( ) #NEWLINE# handler . _verify_artifact = mock . MagicMock ( return_value = False ) #NEWLINE# collab_url = 'https://api.github.com/repos/u/r/collaborators/foo' #NEWLINE# handler . trigger_workflow ( mock_kc , collab_url = collab_url ) #NEWLINE# assert ( not handler . _build_artifact . called )