Change failed trace from using 504 to instead use 422

This commit is contained in:
Björkan
2026-04-30 23:03:08 +02:00
parent 9f6c0f12c5
commit f710a1f2d9
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -699,7 +699,7 @@ class TestTracePath:
assert "not a repeater" in exc.value.detail
@pytest.mark.asyncio
async def test_returns_504_when_no_trace_response_is_heard(self):
async def test_returns_422_when_no_trace_response_is_heard(self):
mc = _mock_meshcore_with_info()
repeater = Contact(
public_key="44" * 32,
@@ -741,7 +741,7 @@ class TestTracePath:
)
)
assert exc.value.status_code == 504
assert exc.value.status_code == 422
assert "No trace response heard" in exc.value.detail
@pytest.mark.asyncio
+2 -2
View File
@@ -510,7 +510,7 @@ class TestTraceRoute:
)
@pytest.mark.asyncio
async def test_wait_timeout_returns_504(self, test_db):
async def test_wait_timeout_returns_422(self, test_db):
mc = _mock_mc()
await _insert_contact(KEY_A, name="Client", contact_type=1)
mc.commands.send_trace = AsyncMock(return_value=_radio_result(EventType.OK))
@@ -524,7 +524,7 @@ class TestTraceRoute:
with pytest.raises(HTTPException) as exc:
await request_trace(KEY_A)
assert exc.value.status_code == 504
assert exc.value.status_code == 422
mc.commands.send_trace.assert_awaited_once_with(
path=KEY_A[:8],
tag=1234,