Search Options

Results per page
Sort
Preferred Languages
Advance

Results 191 - 200 of 1,107 for asset1 (0.05 sec)

  1. tests/test_forms_single_model.py

                "username": "Rick",
                "lastname": "Sanchez",
                "age": "70",
                "tags": ["plumbus", "citadel"],
                "with": "something",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "username": "Rick",
            "lastname": "Sanchez",
            "age": 70,
            "tags": ["plumbus", "citadel"],
            "with": "something",
        }
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 13 09:51:00 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. tests/test_dependency_cache.py

        response = client.get("/counter/")
        assert response.status_code == 200, response.text
        assert response.json() == {"counter": 1}
        response = client.get("/counter/")
        assert response.status_code == 200, response.text
        assert response.json() == {"counter": 2}
    
    
    def test_sub_counter():
        counter_holder["counter"] = 0
        response = client.get("/sub-counter/")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 23 13:30:24 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an.py

    def test_post_no_body_q_bar(client: TestClient):
        response = client.put("/items/5?q=bar", json=None)
        assert response.status_code == 200
        assert response.json() == {"item_id": 5, "q": "bar"}
    
    
    def test_post_no_body(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 200
        assert response.json() == {"item_id": 5}
    
    
    def test_post_id_foo(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_model/test_tutorial003_05_py310.py

        response = client.get("/portal")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Here's your interdimensional portal."}
    
    
    @needs_py310
    def test_get_redirect(client: TestClient):
        response = client.get("/portal", params={"teleport": True}, follow_redirects=False)
        assert response.status_code == 307, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_query_params_str_validations/test_tutorial012_py39.py

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

        assert response.status_code == 200
        assert response.json() == {
            "name": "Foo",
            "price": 3,
            "description": None,
            "tax": None,
        }
    
    
    def test_post_invalid_item():
        response = client.post("/items/", json={"name": "Foo", "price": "invalid price"})
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. tests/test_union_inherited_body.py

        response = client.post("/items/", json={"name": "Foo", "age": 5})
        assert response.status_code == 200, response.text
        assert response.json() == {"item": {"name": "Foo", "age": 5}}
    
    
    def test_post_item():
        response = client.post("/items/", json={"name": "Foo"})
        assert response.status_code == 200, response.text
        assert response.json() == {"item": {"name": "Foo"}}
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  8. tests/test_forms_from_non_typing_sequences.py

        )
        assert response.status_code == 200, response.text
        assert response.json() == ["first", "second", "third"]
    
    
    def test_python_set_param_as_form():
        response = client.post(
            "/form/python-set", data={"items": ["first", "second", "third"]}
        )
        assert response.status_code == 200, response.text
        assert set(response.json()) == {"first", "second", "third"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  9. tests/test_route_scope.py

    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/users/rick")
        assert response.status_code == 200, response.text
        assert response.json() == {"user_id": "rick", "path": "/users/{user_id}"}
    
    
    def test_invalid_method_doesnt_match():
        response = client.post("/users/rick")
        assert response.status_code == 405, response.text
    
    
    def test_invalid_path_doesnt_match():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Feb 08 10:23:07 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. tests/test_inherited_custom_class.py

        app = FastAPI()
    
        @app.get("/fast_uuid")
        def return_fast_uuid():
            asyncpg_uuid = MyUuid("a10ff360-3b1e-4984-a26f-d3ab460bdb51")
            assert isinstance(asyncpg_uuid, uuid.UUID)
            assert type(asyncpg_uuid) is not uuid.UUID
            with pytest.raises(TypeError):
                vars(asyncpg_uuid)
            return {"fast_uuid": asyncpg_uuid}
    
        class SomeCustomClass(BaseModel):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top