Skip to content

Commit d49d3b4

Browse files
author
Joakim Nordling
committed
Add more test cases
1 parent 967e401 commit d49d3b4

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

openapi_to_fastapi/tests/test_router.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,42 @@ def weather_metric(request):
442442
422,
443443
id="datetime-with-space",
444444
),
445+
pytest.param(
446+
{"datetime1": "2025-09-10T12:34:56+10:00"},
447+
200,
448+
200,
449+
id="datetime-with-plus",
450+
),
451+
pytest.param(
452+
{"datetime1": "2025-09-10T12:34:56-10:00"},
453+
200,
454+
200,
455+
id="datetime-with-minus",
456+
),
457+
pytest.param(
458+
{"datetime1": "2025-09-10T12:34:56Z"},
459+
200,
460+
200,
461+
id="datetime-with-z",
462+
),
463+
pytest.param(
464+
{"datetime1": "2025-09-10T12:34:56.789+10:00"},
465+
200,
466+
200,
467+
id="datetime-with-plus-secfrac",
468+
),
469+
pytest.param(
470+
{"datetime1": "2025-09-10T12:34:56.789-10:00"},
471+
200,
472+
200,
473+
id="datetime-with-minus-secfrac",
474+
),
475+
pytest.param(
476+
{"datetime1": "2025-09-10T12:34:56.789Z"},
477+
200,
478+
200,
479+
id="datetime-with-z-secfrac",
480+
),
445481
pytest.param(
446482
{"listDatetime": [1757451600]},
447483
200,

0 commit comments

Comments
 (0)