diff --git a/tests/test_auth.py b/tests/test_auth.py index c8a9eac..95f74f0 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -12,10 +12,8 @@ import time import types import jwt -import pytest from cryptography.hazmat.primitives.asymmetric import ed25519, rsa -from intervals_mcp_server import auth as auth_mod from intervals_mcp_server.auth import AuthentikTokenVerifier, _audience_variants, build_auth ISSUER = "https://auth.example/application/o/x/" diff --git a/tests/test_custom_items.py b/tests/test_custom_items.py index 48a07a4..d7bbb38 100644 --- a/tests/test_custom_items.py +++ b/tests/test_custom_items.py @@ -8,7 +8,6 @@ and the error/empty branches. import asyncio -import pytest from intervals_mcp_server.tools import custom_items @@ -60,7 +59,7 @@ def test_create_builds_full_payload(monkeypatch): rec = _patch(monkeypatch, lambda _k: {"id": 9, "name": "Chart", "type": "FITNESS_CHART"}) out = _run( custom_items.create_custom_item( - name="Chart", item_type="FITNESS_CHART", + name="Chart", item_type="FITNESS_CHART", description="desc", content={"a": 1}, visibility="PRIVATE", ) ) diff --git a/tests/test_events.py b/tests/test_events.py index f9715b2..7d2a115 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -112,7 +112,7 @@ def test_add_event_posts_when_no_event_id(monkeypatch): rec = _patch(monkeypatch, lambda _k: {"id": "e99"}) out = _run( events.add_or_update_event( - workout_type="Ride", name="Threshold", + workout_type="Ride", name="Threshold", start_date="2026-07-10", moving_time=3600, distance=40000, workout_doc=WorkoutDoc(description="d", steps=[Step(duration=600)]), ) @@ -128,7 +128,7 @@ def test_update_event_puts_when_event_id(monkeypatch): rec = _patch(monkeypatch, lambda _k: {"id": "e5"}) _run( events.add_or_update_event( - workout_type="Ride", name="Threshold", + workout_type="Ride", name="Threshold", event_id="e5", start_date="2026-07-10", ) ) diff --git a/tests/test_server.py b/tests/test_server.py index 50ffb9c..dc0583a 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -465,7 +465,7 @@ def test_get_athlete_power_curves(monkeypatch): result = asyncio.run( get_athlete_power_curves( activity_type="Ride", - + ) ) assert "Power Curves (Ride):" in result @@ -492,7 +492,7 @@ def test_get_athlete_power_curves_custom_durations(monkeypatch): get_athlete_power_curves( activity_type="Ride", durations=[5, 60], - + ) ) assert "5s:" in result @@ -518,7 +518,7 @@ def test_get_athlete_power_curves_without_normalised(monkeypatch): get_athlete_power_curves( activity_type="Ride", include_normalised=False, - + ) ) assert "W/kg" not in result @@ -542,7 +542,7 @@ def test_get_athlete_power_curves_date_validation(monkeypatch): get_athlete_power_curves( activity_type="Ride", start_date="2026-01-01", - + ) ) assert "Error" in result @@ -566,7 +566,7 @@ def test_get_athlete_power_curves_no_curves_selected(monkeypatch): activity_type="Ride", this_season=False, last_season=False, - + ) ) assert "Error" in result @@ -675,7 +675,7 @@ def test_create_custom_item_with_string_content(monkeypatch): create_custom_item( name="Activity Field", item_type="ACTIVITY_FIELD", - + content='{"expression": "icu_training_load"}', # type: ignore[arg-type] ) ) @@ -744,7 +744,7 @@ def test_create_custom_item_with_invalid_json_content(monkeypatch): create_custom_item( name="Bad Item", item_type="FITNESS_CHART", - + content="not valid json", # type: ignore[arg-type] ) )