#NEWLINE# @ patch ( 'changes.models.Repository.get_vcs' ) #NEWLINE# def test_when_not_all_in_blacklist_commit_build( self , get_vcs ) : #NEWLINE# #INDENT# fake_vcs = self . get_fake_vcs ( ) #NEWLINE# fake_vcs . read_file . side_effect = None #NEWLINE# fake_vcs . read_file . return_value = yaml . safe_dump ( { #NEWLINE# #INDENT# 'build.file-blacklist' : [ 'ci/not-real' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# get_vcs . return_value = fake_vcs #NEWLINE# self . create_revision ( repository = self . project . repository , sha = ( 'a' * 40 ) ) #NEWLINE# resp = self . client . post ( self . path , data = { #NEWLINE# #INDENT# 'apply_project_files_trigger' : '1' , #NEWLINE# 'sha' : ( 'a' * 40 ) , #NEWLINE# 'repository' : self . project . repository . url , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( resp . status_code == 200 ) #NEWLINE# data = self . unserialize ( resp ) #NEWLINE# assert ( len ( resp ) == 1 )