From 3cee816fbee5de08ccfd6ab830c25edb5c9998cb Mon Sep 17 00:00:00 2001 From: alv2017 Date: Tue, 11 Mar 2025 00:59:39 +0200 Subject: [PATCH] New tests added: tutorial:Path Parameters, tests/test_tutorial/test_path_params/test_tutorial003b.py --- .../test_path_params/test_tutorial003b.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/test_tutorial/test_path_params/test_tutorial003b.py diff --git a/tests/test_tutorial/test_path_params/test_tutorial003b.py b/tests/test_tutorial/test_path_params/test_tutorial003b.py new file mode 100644 index 000000000..ad9442eb3 --- /dev/null +++ b/tests/test_tutorial/test_path_params/test_tutorial003b.py @@ -0,0 +1,15 @@ +import pytest +from fastapi.testclient import TestClient + +from docs_src.path_params.tutorial003b import app + + +@pytest.fixture(name="client") +def get_client(): + return TestClient(app) + + +def test_get_users(client): + response = client.get("/users") + assert response.status_code == 200 + assert response.json() == ["Rick", "Morty"]