Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for test_optional_alias_by_alias (0.34 sec)

  1. tests/test_request_params/test_file/test_optional.py

        assert response.json() == {"file_size": None}
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/optional-bytes-alias",
            "/optional-uploadfile-alias",
        ],
    )
    def test_optional_alias_by_alias(path: str):
        client = TestClient(app)
        response = client.post(path, files=[("p_alias", b"hello")])
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 5}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  2. tests/test_request_params/test_form/test_optional_str.py

        assert response.status_code == 200
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-alias", "/model-optional-alias"],
    )
    def test_optional_alias_by_alias(path: str):
        client = TestClient(app)
        response = client.post(path, data={"p_alias": "hello"})
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  3. tests/test_request_params/test_header/test_optional_str.py

        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/optional-alias",
            "/model-optional-alias",
        ],
    )
    def test_optional_alias_by_alias(path: str):
        client = TestClient(app)
        response = client.get(path, headers={"p_alias": "hello"})
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  4. tests/test_request_params/test_cookie/test_optional_str.py

        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/optional-alias",
            "/model-optional-alias",
        ],
    )
    def test_optional_alias_by_alias(path: str):
        client = TestClient(app)
        client.cookies.set("p_alias", "hello")
        response = client.get(path)
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  5. tests/test_request_params/test_query/test_optional_str.py

        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/optional-alias",
            "/model-optional-alias",
        ],
    )
    def test_optional_alias_by_alias(path: str):
        client = TestClient(app)
        response = client.get(f"{path}?p_alias=hello")
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  6. tests/test_request_params/test_body/test_optional_str.py

        assert response.status_code == 200
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-alias", "/model-optional-alias"],
    )
    def test_optional_alias_by_alias(path: str):
        client = TestClient(app)
        response = client.post(path, json={"p_alias": "hello"})
        assert response.status_code == 200
        assert response.json() == {"p": "hello"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11.6K bytes
    - Viewed (0)
Back to top