Skip to content

Commit cf8d891

Browse files
committed
Mark the invalid-token test fixture as a deliberate non-secret
Bandit B106 flagged the intentionally wrong token used to assert that authentication rejects it, matching the suppression the surrounding fixtures already carry.
1 parent 5ef4b65 commit cf8d891

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/unit_test/test_socket_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def test_framed_wrong_token_is_rejected(self):
287287
server = self._serve(auth_token="secret") # nosec B106 — fake fixture
288288
host, port = server.server_address
289289
with socket.create_connection((host, port)) as client:
290-
reply = send_command(
290+
reply = send_command( # nosec B106 — deliberately invalid fixture token
291291
client, json.dumps([["WR_unknown_command"]]), auth_token="wrong",
292292
)
293293
self.assertIn(b"unauthorized", reply)

0 commit comments

Comments
 (0)