Search Options

Results per page
Sort
Preferred Languages
Advance

Results 341 - 350 of 1,042 for fo2o (0.05 sec)

  1. tests/test_multi_body_errors.py

    
    client = TestClient(app)
    
    
    def test_put_correct_body():
        response = client.post("/items/", json=[{"name": "Foo", "age": 5}])
        assert response.status_code == 200, response.text
        assert response.json() == {
            "item": [
                {
                    "name": "Foo",
                    "age": IsOneOf(
                        5,
                        # TODO: remove when deprecating Pydantic v1
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  2. docs_src/body_updates/tutorial002_py39.py

    class Item(BaseModel):
        name: Union[str, None] = None
        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 1K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/EqualsTester.java

    /**
     * Tester for equals() and hashCode() methods of a class.
     *
     * <p>The simplest use case is:
     *
     * <pre>
     * new EqualsTester().addEqualityGroup(foo).testEquals();
     * </pre>
     *
     * <p>This tests {@code foo.equals(foo)}, {@code foo.equals(null)}, and a few other operations.
     *
     * <p>For more extensive testing, add multiple equality groups. Each group should contain objects
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 31 19:11:50 UTC 2023
    - 6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_handling_errors/test_tutorial001.py

    from docs_src.handling_errors.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py

    from docs_src.query_params_str_validations.tutorial013 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/"
        response = client.get(url)
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py

    client = TestClient(app)
    
    
    def test_default_query_values():
        url = "/items/"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_multi_query_values():
        url = "/items/?q=baz&q=foobar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["baz", "foobar"]}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_query_params_str_validations/test_tutorial013_an.py

    from docs_src.query_params_str_validations.tutorial013_an 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/"
        response = client.get(url)
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/body-multiple-params.md

    В этом случае **FastAPI** будет ожидать тело запроса в формате:
    
    ```JSON hl_lines="2"
    {
        "item": {
            "name": "Foo",
            "description": "The pretender",
            "price": 42.0,
            "tax": 3.2
        }
    }
    ```
    
    вместо этого:
    
    ```JSON
    {
        "name": "Foo",
        "description": "The pretender",
        "price": 42.0,
        "tax": 3.2
    }
    ```
    
    ## Резюме
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/EqualsTester.java

    /**
     * Tester for equals() and hashCode() methods of a class.
     *
     * <p>The simplest use case is:
     *
     * <pre>
     * new EqualsTester().addEqualityGroup(foo).testEquals();
     * </pre>
     *
     * <p>This tests {@code foo.equals(foo)}, {@code foo.equals(null)}, and a few other operations.
     *
     * <p>For more extensive testing, add multiple equality groups. Each group should contain objects
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 31 19:11:50 UTC 2023
    - 6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_query_params_str_validations/test_tutorial012_an.py

    client = TestClient(app)
    
    
    def test_default_query_values():
        url = "/items/"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_multi_query_values():
        url = "/items/?q=baz&q=foobar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["baz", "foobar"]}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
Back to top