Badges : corrections de lint (E501) et couverture du smoke test
Lignes trop longues détectées par ruff (badges.py, tests) ; ajout de /badges au smoke test frontend (rendu SSR de chaque écran protégé). Vérifié dans ce commit : pytest (248 passés), ruff check, alembic check, tsc --noEmit, eslint, vite build, smoke — tous verts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
579ea5d9db
commit
bc165757ca
@@ -23,7 +23,10 @@ def _position(**kw) -> Position:
|
||||
|
||||
|
||||
def _shift(start: dt.datetime, end: dt.datetime) -> Shift:
|
||||
return Shift(id=uuid.uuid4(), edition_id=uuid.uuid4(), position_id=uuid.uuid4(), starts_at=start, ends_at=end)
|
||||
return Shift(
|
||||
id=uuid.uuid4(), edition_id=uuid.uuid4(), position_id=uuid.uuid4(),
|
||||
starts_at=start, ends_at=end,
|
||||
)
|
||||
|
||||
|
||||
def test_position_line_shows_the_schedule():
|
||||
|
||||
@@ -76,7 +76,9 @@ def test_day_part_before_the_day_boundary_rolls_to_the_next_calendar_day(client,
|
||||
shifts = client.get(
|
||||
f"/editions/{edition.id}/shifts", params={"position_id": position["id"]}
|
||||
).json()
|
||||
nuit_shifts = [s for s in shifts if dt.time.fromisoformat(s["starts_at"][11:19]) == dt.time(2, 0)]
|
||||
nuit_shifts = [
|
||||
s for s in shifts if dt.time.fromisoformat(s["starts_at"][11:19]) == dt.time(2, 0)
|
||||
]
|
||||
assert len(nuit_shifts) == 4
|
||||
|
||||
nuit_dates = sorted(dt.date.fromisoformat(s["starts_at"][:10]) for s in nuit_shifts)
|
||||
|
||||
Reference in New Issue
Block a user