#NEWLINE# def test_add_remove_blacklist( self ) : #NEWLINE# #INDENT# path = '/api/0/jenkins_master_blacklist/' #NEWLINE# data = dict ( master_url = 'https://jenkins-master-a' ) #NEWLINE# resp = self . client . post ( path , data = data ) #NEWLINE# assert ( resp . status_code == 200 ) #NEWLINE# data = dict ( master_url = 'https://jenkins-master-b' ) #NEWLINE# resp = self . client . post ( path , data = data ) #NEWLINE# assert ( resp . status_code == 200 ) #NEWLINE# resp = self . client . get ( self ) #NEWLINE# ( resp . status_code == 200 ) #NEWLINE# result = self . unserialize ( resp ) #NEWLINE# assert ( 'https://jenkins-master-a' in result [ 'blacklist' ] ) #NEWLINE# assert ( 'https://jenkins-master-b' in result [ 'blacklist' ] ) #NEWLINE# data = dict ( master_url = 'https://jenkins-master-a' , remove = 1 ) #NEWLINE# resp = self . client . post ( path , data = data ) #NEWLINE# ( resp . status_code == 200 ) #NEWLINE# assert ( [ 'https://jenkins-master-b' ] == self . unserialize ( resp ) [ 'blacklist' ] )