Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 263 for 422 (0.22 sec)

  1. tests/test_required_noneable.py

        assert response.status_code == 422
    
    
    def test_required_noneable_query_value():
        response = client.get("/query", params={"q": "foo"})
        assert response.status_code == 200
        assert response.json() == "foo"
    
    
    def test_required_nonable_explicit_query_invalid():
        response = client.get("/explicit-query")
        assert response.status_code == 422
    
    
    def test_required_nonable_explicit_query_value():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 19:08:31 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  2. tests/test_application.py

                            "200": {
                                "description": "Successful Response",
                                "content": {"application/json": {"schema": {}}},
                            },
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  3. tests/test_annotated.py

            ("/required?foo=bar", 200, {"foo": "bar"}),
            ("/required", 422, foo_is_missing),
            ("/required?foo=", 422, foo_is_short),
            ("/multiple?foo=bar", 200, {"foo": "bar"}),
            ("/multiple", 422, foo_is_missing),
            ("/multiple?foo=", 422, foo_is_short),
            ("/unrelated?foo=bar", 200, {"foo": "bar"}),
            ("/unrelated", 422, foo_is_missing),
        ],
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  4. tests/test_path.py

        assert response.status_code == 200
        assert response.json() == "True"
    
    
    def test_path_int_foobar():
        response = client.get("/path/int/foobar")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "int_parsing",
                        "loc": ["path", "item_id"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  5. tests/test_tuples.py

        response = client.post("/model-with-tuple/", json=data)
        assert response.status_code == 422, response.text
    
        data = {"items": [["foo", "bar"], ["baz"]]}
        response = client.post("/model-with-tuple/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_tuple_with_model_valid():
        data = [{"x": 1, "y": 2}, {"x": 3, "y": 4}]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  6. docs_src/path_operation_advanced_configuration/tutorial007_pv1.py

        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.parse_obj(data)
        except ValidationError as e:
            raise HTTPException(status_code=422, detail=e.errors())
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 789 bytes
    - Viewed (0)
  7. tests/test_dependency_overrides.py

    
    async def overrider_dependency_with_sub(msg: dict = Depends(overrider_sub_dependency)):
        return msg
    
    
    def test_main_depends():
        response = client.get("/main-depends/")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["query", "q"],
                        "msg": "Field required",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  8. tests/test_include_router_defaults_overrides.py

                            },
                            "400": {"description": "Client error level 0"},
                            "401": {"description": "Client error level 1"},
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "file"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_bigger_applications/test_main.py

        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    def test_users_with_no_token(client: TestClient):
        response = client.get("/users")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["query", "token"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
Back to top