Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 531 for 200 (0.25 sec)

  1. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an_py39.py

        app.dependency_overrides = None
        response = client.get("/items/?q=foo&skip=100&limit=200")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "message": "Hello Items!",
            "params": {"q": "foo", "skip": 100, "limit": 200},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial004.py

            (
                "/items?q=foo&skip=1",
                200,
                {"items": [{"item_name": "Bar"}, {"item_name": "Baz"}], "q": "foo"},
            ),
            (
                "/items?q=bar&limit=2",
                200,
                {"items": [{"item_name": "Foo"}, {"item_name": "Bar"}], "q": "bar"},
            ),
            (
                "/items?q=bar&skip=1&limit=1",
                200,
                {"items": [{"item_name": "Bar"}], "q": "bar"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an.py

        assert response.status_code == 200, response.text
        assert response.json() == {
            "message": "Hello Users!",
            "params": {"q": "foo", "skip": 5, "limit": 10},
        }
    
    
    def test_normal_app():
        app.dependency_overrides = None
        response = client.get("/items/?q=foo&skip=100&limit=200")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_cookie_params/test_tutorial001_py310.py

        [
            ("/items", None, 200, {"ads_id": None}),
            ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}),
            (
                "/items",
                {"ads_id": "ads_track", "session": "cookiesession"},
                200,
                {"ads_id": "ads_track"},
            ),
            ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}),
        ],
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_header_params/test_tutorial002_an_py310.py

    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"strange_header": None}),
            ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}),
            (
                "/items",
                {"strange_header": "FastAPI test"},
                200,
                {"strange_header": "FastAPI test"},
            ),
            (
                "/items",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial004_py310.py

            (
                "/items?q=foo&skip=1",
                200,
                {"items": [{"item_name": "Bar"}, {"item_name": "Baz"}], "q": "foo"},
            ),
            (
                "/items?q=bar&limit=2",
                200,
                {"items": [{"item_name": "Foo"}, {"item_name": "Bar"}], "q": "bar"},
            ),
            (
                "/items?q=bar&skip=1&limit=1",
                200,
                {"items": [{"item_name": "Bar"}], "q": "bar"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_header_params/test_tutorial001.py

    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
            ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}),
        ],
    )
    def test(path, headers, expected_status, expected_response):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial003.py

                    ("files", ("test2.txt", file2)),
                ),
            )
        assert response.status_code == 200, response.text
        assert response.json() == {"filenames": ["test.txt", "test2.txt"]}
    
    
    def test_get_root():
        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py

        [
            ("/items", None, 200, {"ads_id": None}),
            ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}),
            (
                "/items",
                {"ads_id": "ads_track", "session": "cookiesession"},
                200,
                {"ads_id": "ads_track"},
            ),
            ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}),
        ],
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_header_params/test_tutorial001_py310.py

    
    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
            ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}),
        ],
    )
    def test(path, headers, expected_status, expected_response, client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4K bytes
    - Viewed (0)
Back to top