diff options
author | Thanh Ha <zxiiro@gmail.com> | 2019-08-23 09:14:39 -0400 |
---|---|---|
committer | Sorin Sbarnea <ssbarnea@redhat.com> | 2019-09-09 19:23:24 +0100 |
commit | 4d90c187a945c04b9949d5ee7738a049dd634897 (patch) | |
tree | 106bf6e05ad1f2260823e7cd68651b535b8ac3ef /tests/cachestorage/test_cachestorage.py | |
parent | ead185134d8aa5d3d0974207356de6c4fdb2e6e8 (diff) | |
download | python-jenkins-job-builder-4d90c187a945c04b9949d5ee7738a049dd634897.tar.gz python-jenkins-job-builder-4d90c187a945c04b9949d5ee7738a049dd634897.tar.xz python-jenkins-job-builder-4d90c187a945c04b9949d5ee7738a049dd634897.zip |
Auto-generated output from python-black
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.
Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Diffstat (limited to 'tests/cachestorage/test_cachestorage.py')
-rw-r--r-- | tests/cachestorage/test_cachestorage.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/cachestorage/test_cachestorage.py b/tests/cachestorage/test_cachestorage.py index 138f1406..34803895 100644 --- a/tests/cachestorage/test_cachestorage.py +++ b/tests/cachestorage/test_cachestorage.py @@ -21,28 +21,25 @@ from tests.base import mock class TestCaseJobCache(base.BaseTestCase): - - @mock.patch('jenkins_jobs.builder.JobCache.get_cache_dir', - lambda x: '/bad/file') + @mock.patch("jenkins_jobs.builder.JobCache.get_cache_dir", lambda x: "/bad/file") def test_save_on_exit(self): """ Test that the cache is saved on normal object deletion """ - with mock.patch('jenkins_jobs.builder.JobCache.save') as save_mock: - with mock.patch('os.path.isfile', return_value=False): - with mock.patch('jenkins_jobs.builder.JobCache._lock'): + with mock.patch("jenkins_jobs.builder.JobCache.save") as save_mock: + with mock.patch("os.path.isfile", return_value=False): + with mock.patch("jenkins_jobs.builder.JobCache._lock"): jenkins_jobs.builder.JobCache("dummy") save_mock.assert_called_with() - @mock.patch('jenkins_jobs.builder.JobCache.get_cache_dir', - lambda x: '/bad/file') + @mock.patch("jenkins_jobs.builder.JobCache.get_cache_dir", lambda x: "/bad/file") def test_cache_file(self): """ Test providing a cachefile. """ 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'): + 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 |