(test_client_factory: TestClientFactory, app: Router)
| 50 | |
| 51 | |
| 52 | def test_datetime_convertor(test_client_factory: TestClientFactory, app: Router) -> None: |
| 53 | client = test_client_factory(app) |
| 54 | response = client.get("/datetime/2020-01-01T00:00:00") |
| 55 | assert response.json() == {"datetime": "2020-01-01T00:00:00"} |
| 56 | |
| 57 | assert ( |
| 58 | app.url_path_for("datetime-convertor", param=datetime(1996, 1, 22, 23, 0, 0)) == "/datetime/1996-01-22T23:00:00" |
| 59 | ) |
| 60 | |
| 61 | |
| 62 | @pytest.mark.parametrize("param, status_code", [("1.0", 200), ("1-0", 404)]) |
nothing calls this directly
no test coverage detected