'Test providing a cachefile.'

@mock.patch('jenkins_jobs.builder.JobCache.get_cache_dir', (lambda x: '/bad/file'))
def test_cache_file(self):

    test_file = os.path.abspath(__file__)
    with mock.patch('os.path.join', return_value=test_file):
        with mock.patch('yaml.load'):
            with mock.patch('jenkins_jobs.builder.JobCache._lock'):
                jenkins_jobs.builder.JobCache('dummy').data = None
