mirror of
https://github.com/zvx-echo6/central.git
synced 2026-06-10 20:04:43 +02:00
tests: ruff cleanup in test_gui_adapter_edit.py (3 violations -> 0)
- F401: drop unused TOMTOM_FREE_TIER_CALLS_PER_MONTH import - E702 x2: split semicolon-joined statements (lines 142, 202) Mechanical only; zero behavior change. Suite holds at 900/1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3b75f33eaf
commit
0f59fe63ef
1 changed files with 5 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ from central.gui import templates as gui_templates
|
|||
from central.gui.form_descriptors import describe_fields
|
||||
from central.gui.routes import adapters_edit_form, adapters_edit_submit
|
||||
from central.adapters.tomtom_incidents import (
|
||||
TomTomIncidentsAdapter, TomTomIncidentsSettings, TOMTOM_FREE_TIER_CALLS_PER_MONTH,
|
||||
TomTomIncidentsAdapter, TomTomIncidentsSettings,
|
||||
)
|
||||
|
||||
_BBOXES = [
|
||||
|
|
@ -139,7 +139,8 @@ def _bbox_pairs(i, name, state="ID", cadence=None, **coords):
|
|||
|
||||
async def _submit_expect_422(pairs, cadence_s="1800"):
|
||||
pool, _ = _pool()
|
||||
tmpl = MagicMock(); tmpl.TemplateResponse.return_value = MagicMock()
|
||||
tmpl = MagicMock()
|
||||
tmpl.TemplateResponse.return_value = MagicMock()
|
||||
with patch("central.gui.routes._get_templates", return_value=tmpl), \
|
||||
patch("central.gui.routes.get_pool", return_value=pool), \
|
||||
patch("central.gui.routes.adapter_has_resolved_api_key",
|
||||
|
|
@ -199,7 +200,8 @@ class TestGetRoute:
|
|||
@pytest.mark.asyncio
|
||||
async def test_get_200_with_quota_in_context(self):
|
||||
pool, _ = _pool()
|
||||
tmpl = MagicMock(); tmpl.TemplateResponse.return_value = MagicMock(status_code=200)
|
||||
tmpl = MagicMock()
|
||||
tmpl.TemplateResponse.return_value = MagicMock(status_code=200)
|
||||
req = MagicMock()
|
||||
req.state.operator = SimpleNamespace(id=1, username="admin")
|
||||
req.state.csrf_token = "x"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue