test(deck): use https in mock request URL to clear Sonar hotspot

The move-card unit tests added a mock httpx.Request with an http:// URL,
which SonarCloud flags as a new security hotspot (insecure protocol),
failing the new-code quality gate. The URL is never dialed (it only labels
a synthetic HTTPStatusError), but switch it to https to keep the gate green.
Also simplify the done-PUT mock to a bare 200 response, since that response
is discarded by the implementation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-11 00:05:30 +02:00
co-authored by Claude Opus 4.8
parent 5ae9cc2a98
commit 98c9d58e54
+2 -2
View File
@@ -114,7 +114,7 @@ async def test_move_card_to_board_restores_done_state(mocker):
card_id=8, stack_id=10, done="2029-12-31T23:59:00+00:00"
),
create_mock_deck_card_response(card_id=8, stack_id=99, done=None),
create_mock_deck_card_response(card_id=8, stack_id=99), # done PUT
create_mock_response(status_code=200, json_data={}), # done PUT (ignored)
create_mock_deck_card_response( # re-fetch after restore
card_id=8, stack_id=99, done="2031-01-01T00:00:00+00:00"
),
@@ -151,7 +151,7 @@ async def test_move_card_to_board_done_restore_failure_is_swallowed(mocker):
create_mock_deck_card_response(card_id=8, stack_id=99, done=None), # move
httpx.HTTPStatusError( # done PUT fails
"500 Server Error",
request=httpx.Request("PUT", "http://test.local"),
request=httpx.Request("PUT", "https://test.local"),
response=create_mock_response(status_code=500, json_data={}),
),
],