diff --git a/.bandit-test.yml b/.bandit-test.yml index c71cb1be..890cef2a 100644 --- a/.bandit-test.yml +++ b/.bandit-test.yml @@ -1 +1 @@ -skips: ['B101', 'B306', 'B404'] \ No newline at end of file +skips: ['B101', 'B404'] \ No newline at end of file diff --git a/tests/ahriman/application/test_lock.py b/tests/ahriman/application/test_lock.py index 43dcf8f6..1e9abeef 100644 --- a/tests/ahriman/application/test_lock.py +++ b/tests/ahriman/application/test_lock.py @@ -111,7 +111,7 @@ def test_clear(lock: Lock) -> None: """ must remove lock file """ - lock.path = Path(tempfile.mktemp()) + lock.path = Path(tempfile.mktemp()) # nosec lock.path.touch() lock.clear() @@ -122,7 +122,7 @@ def test_clear_missing(lock: Lock) -> None: """ must not fail on lock removal if file is missing """ - lock.path = Path(tempfile.mktemp()) + lock.path = Path(tempfile.mktemp()) # nosec lock.clear() @@ -139,7 +139,7 @@ def test_create(lock: Lock) -> None: """ must create lock """ - lock.path = Path(tempfile.mktemp()) + lock.path = Path(tempfile.mktemp()) # nosec lock.create() assert lock.path.is_file() @@ -150,7 +150,7 @@ def test_create_exception(lock: Lock) -> None: """ must raise exception if file already exists """ - lock.path = Path(tempfile.mktemp()) + lock.path = Path(tempfile.mktemp()) # nosec lock.path.touch() with pytest.raises(DuplicateRun): @@ -172,7 +172,7 @@ def test_create_unsafe(lock: Lock) -> None: must not raise exception if force flag set """ lock.force = True - lock.path = Path(tempfile.mktemp()) + lock.path = Path(tempfile.mktemp()) # nosec lock.path.touch() lock.create() diff --git a/tests/ahriman/core/status/test_watcher.py b/tests/ahriman/core/status/test_watcher.py index 5baadb1f..a0dcc6ec 100644 --- a/tests/ahriman/core/status/test_watcher.py +++ b/tests/ahriman/core/status/test_watcher.py @@ -106,7 +106,7 @@ def test_cache_save_load(watcher: Watcher, package_ahriman: Package, mocker: Moc """ must save state to cache which can be loaded later """ - dump_file = Path(tempfile.mktemp()) + dump_file = Path(tempfile.mktemp()) # nosec mocker.patch("ahriman.core.status.watcher.Watcher.cache_path", new_callable=PropertyMock, return_value=dump_file) known_current = {package_ahriman.base: (package_ahriman, BuildStatus())}