Enable some more bandit checks (#30857)

* Enable B108 (hardcoded tmp dir), address findings

* Enable B602 (subprocess popen with shell), address findings

* Enable B604 (start process with shell), address findings

* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
This commit is contained in:
Ville Skyttä 2020-01-20 18:44:55 +02:00 committed by GitHub
parent 6cf20fc7fa
commit 5e2ba2eb77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 110 additions and 91 deletions

View file

@ -48,7 +48,7 @@ class TestLiteJetSwitch(unittest.TestCase):
self.mock_lj.on_switch_pressed.side_effect = on_switch_pressed
self.mock_lj.on_switch_released.side_effect = on_switch_released
config = {"litejet": {"port": "/tmp/this_will_be_mocked"}}
config = {"litejet": {"port": "/dev/serial/by-id/mock-litejet"}}
if method == self.test_include_switches_False:
config["litejet"]["include_switches"] = False
elif method != self.test_include_switches_unspecified: