Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 466 for jeon (0.21 sec)

  1. tests/test_application.py

        response = client.get("/enum-status-code")
        assert response.status_code == 201, response.text
        assert response.json() == "foo bar"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
    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)
  2. docs_src/app_testing/app_b/test_main.py

        assert response.status_code == 404
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_create_item():
        response = client.post(
            "/items/",
            headers={"X-Token": "coneofsilence"},
            json={"id": "foobar", "title": "Foo Bar", "description": "The Foo Barters"},
        )
        assert response.status_code == 200
        assert response.json() == {
            "id": "foobar",
            "title": "Foo Bar",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. tests/test_tuples.py

        response = client.post("/model-with-tuple/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_model_with_tuple_invalid():
        data = {"items": [["foo", "bar"], ["baz", "whatelse", "too", "much"]]}
        response = client.post("/model-with-tuple/", json=data)
        assert response.status_code == 422, response.text
    
    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)
  4. tests/test_schema_extra_examples.py

        response = client.post("/schema_extra/", json={"data": "Foo"})
        assert response.status_code == 200, response.text
        response = client.post("/example/", json={"data": "Foo"})
        assert response.status_code == 200, response.text
        response = client.post("/examples/", json={"data": "Foo"})
        assert response.status_code == 200, response.text
        response = client.post("/example_examples/", json={"data": "Foo"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. 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):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_sql_databases.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    # TODO: pv2 add version with Pydantic v2
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial002.py

                        "type": "value_error.missing",
                    }
                ]
            }
        )
    
    
    def test_post_body_json():
        response = client.post("/files/", json={"file": "Foo"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "files"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial005_py39.py

        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  10. tests/test_dependency_overrides.py

        assert response.status_code == 200
        assert response.json() == {
            "in": "main-depends",
            "params": {"q": "foo", "skip": 0, "limit": 100},
        }
    
    
    def test_main_depends_q_foo_skip_100_limit_200():
        response = client.get("/main-depends/?q=foo&skip=100&limit=200")
        assert response.status_code == 200
        assert response.json() == {
            "in": "main-depends",
    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)
Back to top