mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user