Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 101 for create_item (0.2 sec)

  1. tests/test_tutorial/test_testing/test_main_b_an.py

    from docs_src.app_testing.app_b_an import test_main
    
    
    def test_app():
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 303 bytes
    - Viewed (1)
  2. tests/test_openapi_separate_input_output_schemas.py

        app = FastAPI(separate_input_output_schemas=separate_input_output_schemas)
    
        @app.post("/items/")
        def create_item(item: Item):
            return item
    
        @app.post("/items-list/")
        def create_item_list(item: List[Item]):
            return item
    
        @app.get("/items/")
        def read_items() -> List[Item]:
            return [
                Item(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  3. tests/test_tutorial/test_testing/test_main_b_an_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_app():
        from docs_src.app_testing.app_b_an_py310 import test_main
    
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 360 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_testing/test_main_b.py

    from docs_src.app_testing.app_b import test_main
    
    
    def test_app():
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 300 bytes
    - Viewed (0)
  5. docs_src/app_testing/app_b_an/test_main.py

    def test_read_nonexistent_item():
        response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
        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"},
        )
    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)
  6. tests/test_tutorial/test_testing/test_main_b_an_py39.py

    from ...utils import needs_py39
    
    
    @needs_py39
    def test_app():
        from docs_src.app_testing.app_b_an_py39 import test_main
    
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 357 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_testing/test_main_b_py310.py

    from ...utils import needs_py310
    
    
    @needs_py310
    def test_app():
        from docs_src.app_testing.app_b_py310 import test_main
    
        test_main.test_create_existing_item()
        test_main.test_create_item()
        test_main.test_create_item_bad_token()
        test_main.test_read_nonexistent_item()
        test_main.test_read_item()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 357 bytes
    - Viewed (0)
  8. docs_src/app_testing/app_b/test_main.py

    def test_read_nonexistent_item():
        response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
        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"},
        )
    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)
  9. docs_src/app_testing/app_b_an_py310/test_main.py

    def test_read_nonexistent_item():
        response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
        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"},
        )
    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)
  10. docs_src/app_testing/app_b_an_py39/test_main.py

    def test_read_nonexistent_item():
        response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
        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"},
        )
    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)
Back to top