Search Options

Results per page
Sort
Preferred Languages
Advance

Results 301 - 310 of 1,107 for asset1 (0.07 sec)

  1. tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py39.py

        response = client.put("/items/foo", json={"name": "Wrestlers"})
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    @needs_py39
    def test_create(client: TestClient):
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 737 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_extra_models/test_tutorial003_py310.py

        response = client.get("/items/item1")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "description": "All my friends drive a low rider",
            "type": "car",
        }
    
    
    @needs_py310
    def test_get_plane(client: TestClient):
        response = client.get("/items/item2")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  3. tests/test_modules_same_name_body/test_main.py

        assert response.status_code == 200, response.text
        data = response.json()
    
    
    def test_post_b_invalid():
        data = {"a": "bar", "b": "foo"}
        response = client.post("/b/compute/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. tests/test_security_openid_connect_optional.py

        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Bearer footokenbar"}
    
    
    def test_security_oauth2_password_other_header():
        response = client.get("/users/me", headers={"Authorization": "Other footokenbar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Other footokenbar"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  5. tests/test_repeated_dependency_schema.py

        response = client.get("/openapi.json")
        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == schema
        assert (
            len(actual_schema["paths"]["/"]["get"]["parameters"]) == 1
        )  # primary goal of this test
    
    
    def test_response():
        response = client.get("/", headers={"someheader": "hello"})
        assert response.status_code == status.HTTP_200_OK
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  6. tests/test_response_code_no_body.py

    
    def test_get_response():
        response = client.get("/a")
        assert response.status_code == 204, response.text
        assert "content-length" not in response.headers
        assert response.content == b""
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  7. tests/test_skip_defaults.py

    
    def test_return_defaults():
        response = client.get("/")
        assert response.json() == {"sub": {}}
    
    
    def test_return_exclude_unset():
        response = client.get("/exclude_unset")
        assert response.json() == {"x": None, "y": "y"}
    
    
    def test_return_exclude_defaults():
        response = client.get("/exclude_defaults")
        assert response.json() == {}
    
    
    def test_return_exclude_none():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 2K bytes
    - Viewed (0)
  8. tests/test_validate_response_recursive/test_validate_response_recursive_pv2.py

        client = TestClient(app)
        response = client.get("/items/recursive")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "sub_items": [{"name": "subitem", "sub_items": []}],
            "name": "item",
        }
    
        response = client.get("/items/recursive-submodel")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "item",
            "sub_items1": [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 900 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_custom_response/test_tutorial006c.py

    def test_redirect_status_code():
        response = client.get("/pydantic", follow_redirects=False)
        assert response.status_code == 302
        assert response.headers["location"] == "https://docs.pydantic.dev/"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 899 bytes
    - Viewed (0)
  10. tests/test_empty_router.py

    client = TestClient(app)
    
    
    def test_use_empty():
        with client:
            response = client.get("/prefix")
            assert response.status_code == 200, response.text
            assert response.json() == ["OK"]
    
            response = client.get("/prefix/")
            assert response.status_code == 200, response.text
            assert response.json() == ["OK"]
    
    
    def test_include_empty():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 11 22:37:34 UTC 2023
    - 805 bytes
    - Viewed (0)
Back to top