Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_multi_query_values (0.22 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.query_params_str_validations.tutorial011 import app
    
    client = TestClient(app)
    
    
    def test_multi_query_values():
        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_query_no_values():
        url = "/items/"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.9K bytes
    - Viewed (0)
Back to top