add tests

This commit is contained in:
imperosol
2026-09-13 12:18:39 +02:00
parent 49f32169fa
commit e3b4d9e81f
3 changed files with 45 additions and 51 deletions
+2 -5
View File
@@ -29,14 +29,11 @@ class UeController(ControllerBase):
response=UeSchema,
)
def fetch_from_utbm_api(
self,
code: str,
lang: Query[str] = "fr",
year: Query[Annotated[int, Ge(2010)] | None] = None,
self, code: str, year: Query[Annotated[int, Ge(2010)] | None] = None
):
"""Fetch UE data from the UTBM API and returns it after some parsing."""
with UtbmApiClient() as client:
res = client.find_ue(lang, code, year)
res = client.find_ue(code, year)
if res is None:
raise NotFound
return res