#NEWLINE# @ mock . patch ( 'letsencrypt_plesk.challenge.PleskChallenge' ) #NEWLINE# def test_perform( self , challenge_mock ) : #NEWLINE# #INDENT# challenge_mock . perform = mock . MagicMock ( ) #NEWLINE# achalls = [ self . _mock_achall ( 'example.com' ) , self . _mock_achall ( 'www.example.com' ) ] #NEWLINE# responses = self . configurator . perform ( achalls ) #NEWLINE# self . assertEqual ( len ( achalls ) , len ( responses ) ) #NEWLINE# challenge = self . configurator . plesk_challenges [ 'example.com' ] #NEWLINE# challenge . perform . assert_has_calls ( [ mock . call ( challenge_mock ) for a in achalls ] )