Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for picture (0.24 sec)

  1. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client() -> TestClient:
        from docs_src.separate_openapi_schemas.tutorial002 import app
    
        client = TestClient(app)
        return client
    
    
    def test_create_item(client: TestClient) -> None:
        response = client.post("/items/", json={"name": "Foo"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_events/test_tutorial002.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.events.tutorial002 import app
        yield app
    
    
    def test_events(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/items/")
            assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py

    import os
    from pathlib import Path
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        print(static_dir)
        static_dir.mkdir(exist_ok=True)
        from docs_src.custom_docs_ui.tutorial002 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
Back to top