test: silence Bandit B108 on hardcoded /tmp test-fixture paths

Three test fixtures pass a string-shaped /tmp path into PrintArchive
rows. The file is never created — the field is just a DB column the
ORM accepts as a string — but Bandit's B108 rule fires on any literal
/tmp/ path it sees in source. Suppress with the same `# nosec B108`
marker convention test_archives_api.py and test_queue_start_user_attribution.py
already use for the same shape.
This commit is contained in:
maziggy
2026-06-28 13:52:05 +02:00
parent a46b120336
commit 8f4c8375cb
3 changed files with 202 additions and 3 deletions
@@ -2482,7 +2482,7 @@ class TestResumeQueueAfterFailure:
defaults = {
"filename": f"resume_print_{counter}.3mf",
"print_name": f"Resume Print {counter}",
"file_path": f"/tmp/resume_print_{counter}.3mf",
"file_path": f"/tmp/resume_print_{counter}.3mf", # nosec B108
"file_size": 1024,
"content_hash": f"resumehash{counter:08d}",
"status": "completed",
@@ -2721,7 +2721,7 @@ class TestReorderEndpoint:
defaults = {
"filename": f"reorder_{_counter[0]}.3mf",
"print_name": f"Reorder {_counter[0]}",
"file_path": f"/tmp/reorder_{_counter[0]}.3mf",
"file_path": f"/tmp/reorder_{_counter[0]}.3mf", # nosec B108
"file_size": 1024,
"content_hash": f"reorderhash{_counter[0]:06d}",
"status": "completed",