fix(backend): revert routes_test.py formatter artifacts that break CI lint

The local formatter (ruff 0.15.7) reformatted 3 function signatures
to multi-line style, but CI uses black (via poetry run lint) which
expects single-line for functions under the line-length limit.
Revert to the single-line form that was passing CI.
This commit is contained in:
majdyz
2026-04-15 13:48:13 +07:00
parent 6b8e4a2c8f
commit e9b27f9152

View File

@@ -703,9 +703,7 @@ def test_stream_chat_rejects_too_long_message():
assert response.status_code == 422
def test_stream_chat_accepts_exactly_max_length_message(
mocker: pytest_mock.MockFixture,
):
def test_stream_chat_accepts_exactly_max_length_message(mocker: pytest_mock.MockFixture):
"""A message exactly at max_length=64_000 must be accepted."""
_mock_stream_internals(mocker)
mocker.patch(
@@ -987,9 +985,7 @@ def test_get_session_load_more_skips_active_stream(
# ─── cancel_session_task ──────────────────────────────────────────────
def _mock_validate_session(
mocker: pytest_mock.MockerFixture, *, session_id: str = "sess-1"
):
def _mock_validate_session(mocker: pytest_mock.MockerFixture, *, session_id: str = "sess-1"):
"""Mock _validate_and_get_session to return a dummy session."""
from backend.copilot.model import ChatSession
@@ -1357,9 +1353,7 @@ def test_reset_usage_success(mocker: pytest_mock.MockerFixture) -> None:
assert "weekly" in data["usage"]
def test_reset_usage_refunds_on_redis_failure(
mocker: pytest_mock.MockerFixture,
) -> None:
def test_reset_usage_refunds_on_redis_failure(mocker: pytest_mock.MockerFixture) -> None:
"""POST /usage/reset returns 503 and refunds credits when Redis reset fails."""
mock_credit = _mock_reset_internals(mocker, reset_daily=False)