Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 26 of 26 for dep_session (0.05 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial007.py

    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(
            "docs_src.dependencies.tutorial007_py39.DBSession",
            return_value=dbsession_moock,
            create=True,
        ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 642 bytes
    - Viewed (0)
  2. docs_src/sql_databases/tutorial001_an_py39.py

    engine = create_engine(sqlite_url, connect_args=connect_args)
    
    
    def create_db_and_tables():
        SQLModel.metadata.create_all(engine)
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    SessionDep = Annotated[Session, Depends(get_session)]
    
    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    @app.post("/heroes/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. impl/maven-core/src/test/java/org/apache/maven/project/ProjectModelResolverTest.java

            final DefaultRepositorySystemSession repoSession = new DefaultRepositorySystemSession(h -> false);
            repoSession.setLocalRepositoryManager(new LegacyLocalRepositoryManager(localRepo));
    
            return new ProjectModelResolver(
                    repoSession,
                    null,
                    getContainer().lookup(RepositorySystem.class),
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Wed Sep 17 10:01:14 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  4. docs_src/sql_databases/tutorial002_an_py310.py

    engine = create_engine(sqlite_url, connect_args=connect_args)
    
    
    def create_db_and_tables():
        SQLModel.metadata.create_all(engine)
    
    
    def get_session():
        with Session(engine) as session:
            yield session
    
    
    SessionDep = Annotated[Session, Depends(get_session)]
    app = FastAPI()
    
    
    @app.on_event("startup")
    def on_startup():
        create_db_and_tables()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. compat/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java

            return container;
        }
    
        @BeforeEach
        public void setUp() throws Exception {
            RepositorySystemSession repoSession = initRepoSession();
            MavenSession session = new MavenSession(
                    getContainer(), repoSession, new DefaultMavenExecutionRequest(), new DefaultMavenExecutionResult());
            session.setSession(new DefaultSessionFactory(
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Oct 10 09:40:15 UTC 2025
    - 13.8K bytes
    - Viewed (0)
  6. impl/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java

            DefaultRepositorySystemSession repoSession = MavenTestHelper.createSession(repositorySystem, container);
            LocalRepository localRepo =
                    new LocalRepository(config.getLocalRepository().getBasedir());
            repoSession.setLocalRepositoryManager(
                    new SimpleLocalRepositoryManagerFactory().newInstance(repoSession, localRepo));
            config.setRepositorySession(repoSession);
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Wed Sep 17 10:01:14 UTC 2025
    - 94.8K bytes
    - Viewed (0)
Back to top