'Test handling the deletion of multiple Jenkins jobs using the glob
parameters feature.'

@mock.patch('jenkins_jobs.builder.JenkinsManager.delete_job')
def test_delete_using_glob_params(self, delete_job_mock):

    args = ['--conf', self.default_config_file, 'delete', '--path', os.path.join(self.fixtures_path, 'cmd-002.yaml'), '*bar*']
    self.execute_jenkins_jobs_with_args(args)
    calls = [mock.call('bar001'), mock.call('bar002')]
    delete_job_mock.assert_has_calls(calls, any_order=True)
    self.assertEqual(delete_job_mock.call_count, len(calls), ("Jenkins.delete_job()    was    called    '%s'    times    when    expected    '%s'" % (delete_job_mock.call_count, len(calls))))
