'Test paths returned by the recursive processing when using pattern
excludes.
testing paths
/jjb_configs/dir1/test1/
/jjb_configs/dir1/file
/jjb_configs/dir2/test2/
/jjb_configs/dir3/bar/
/jjb_configs/test3/bar/
/jjb_configs/test3/baz/'

@mock.patch('jenkins_jobs.utils.os.walk')
def test_recursive_path_option_exclude_pattern(self, oswalk_mock):

    os_walk_paths = [('/jjb_configs', (['dir1', 'dir2', 'dir3', 'test3'], ())), ('/jjb_configs/dir1', (['test1'], 'file')), ('/jjb_configs/dir2', (['test2'], ())), ('/jjb_configs/dir3', (['bar'], ())), ('/jjb_configs/dir3/bar', ([], ())), ('/jjb_configs/test3/bar', None), ('/jjb_configs/test3/baz', None)]
    paths = [k for (k, v) in os_walk_paths if (v is not None)]
    oswalk_mock.side_effect = fake_os_walk(os_walk_paths)
    self.assertEqual(paths, utils.recurse_path('/jjb_configs', ['test*']))
