From c5132e9839eec6784404e6b59ab9aeeead7413bf Mon Sep 17 00:00:00 2001 From: maziggy Date: Sat, 16 May 2026 13:45:28 +0200 Subject: [PATCH] chore(tests): replace /tmp/ literal in test_layer_timelapse_expected_archive.py to clear Bandit B108 Synthetic value on mock_archive.file_path was "/tmp/fake.3mf" - Bandit flagged it as "Probable insecure usage of temp file/directory" even though the string is never used as a filesystem path. Swapped to "/test/archives/fake.3mf", matching the pattern used in commit 9f1188d7 to clear the same finding on test_library_trash_api.py and test_pending_upload_display_name.py. No suppression comment needed - the new path no longer matches Bandit's regex. --- backend/tests/unit/test_layer_timelapse_expected_archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/tests/unit/test_layer_timelapse_expected_archive.py b/backend/tests/unit/test_layer_timelapse_expected_archive.py index d9bdec972..9afeffd20 100644 --- a/backend/tests/unit/test_layer_timelapse_expected_archive.py +++ b/backend/tests/unit/test_layer_timelapse_expected_archive.py @@ -75,7 +75,7 @@ def _build_mocks(*, external_camera_enabled: bool, external_camera_url: str | No mock_archive.printer_id = 1 mock_archive.print_name = "Universal Spirit Level Holder" mock_archive.status = "pending" - mock_archive.file_path = "/tmp/fake.3mf" + mock_archive.file_path = "/test/archives/fake.3mf" return mock_printer, mock_archive