Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for get_sub (0.05 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial010.py

    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    from docs_src.dependencies.tutorial010_py39 import get_db
    
    
    def test_get_db():
        app = FastAPI()
    
        @app.get("/")
        def read_root(c: Annotated[Any, Depends(get_db)]):
            return {"c": str(c)}
    
        client = TestClient(app)
    
        dbsession_mock = Mock()
    
        with patch(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 688 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial007.py

    import asyncio
    from contextlib import asynccontextmanager
    from unittest.mock import Mock, patch
    
    from docs_src.dependencies.tutorial007_py39 import get_db
    
    
    def test_get_db():  # Just for coverage
        async def test_async_gen():
            cm = asynccontextmanager(get_db)
            async with cm() as db_session:
                return db_session
    
        dbsession_moock = Mock()
    
        with patch(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 642 bytes
    - Viewed (0)
  3. docs/en/docs/release-notes.md

    * Make sure the `*` in short features in the docs is consistent (after `.`) in all languages. PR [#1424](https://github.com/tiangolo/fastapi/pull/1424).
    * Update order of execution for `get_db` in SQLAlchemy tutorial. PR [#1293](https://github.com/tiangolo/fastapi/pull/1293) by [@bcb](https://github.com/bcb).
    * Fix typos in Async docs. PR [#1423](https://github.com/tiangolo/fastapi/pull/1423).
    
    ## 0.54.2
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top