From cc7aabc12ef51809a115a5b27634affc4379b49a Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Thu, 6 Jul 2017 15:31:17 +0200 Subject: Add bandit check to all python code Bandit was not running in all directories due missing -r parameter. Also, this change fix bandit errors. * Add nosec to subprocess module * Change /tmp/releases to .releases * Change /tmp/ to tmp/, tmp/ is not checked and in unittest is not an issue, simpler that mocking tempfile and make more complex tests. Change-Id: I42bafa4707a9a4d1faeb01cb9b5a843f56280deb --- kolla/tests/test_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kolla') diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py index c1d17cfdb..44d1b0c5b 100644 --- a/kolla/tests/test_build.py +++ b/kolla/tests/test_build.py @@ -373,10 +373,10 @@ class KollaWorkerTest(base.TestCase): @mock.patch('shutil.copytree') def test_work_dir(self, copytree_mock): - self.conf.set_override('work_dir', '/tmp/foo') + self.conf.set_override('work_dir', 'tmp/foo') kolla = build.KollaWorker(self.conf) kolla.setup_working_dir() - self.assertEqual('/tmp/foo/docker', kolla.working_dir) + self.assertEqual('tmp/foo/docker', kolla.working_dir) class MainTest(base.TestCase): -- cgit v1.2.3