agent0.chainsync.test_fixtures ============================== .. py:module:: agent0.chainsync.test_fixtures .. autoapi-nested-parse:: Test fixtures for chainsync .. !! processed by numpydoc !! Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/agent0/chainsync/test_fixtures/db_session/index /autoapi/agent0/chainsync/test_fixtures/dummy_session/index Functions --------- .. autoapisummary:: agent0.chainsync.test_fixtures.database_engine agent0.chainsync.test_fixtures.db_session agent0.chainsync.test_fixtures.psql_docker agent0.chainsync.test_fixtures.dummy_session Package Contents ---------------- .. py:function:: database_engine(psql_docker: agent0.chainsync.PostgresConfig) -> Iterator[sqlalchemy.Engine] Create psql engine on local postgres container. :param psql_docker: The PostgresConfig object returned by the `psql_docker` test fixture. :type psql_docker: PostgresConfig :Yields: *Engine* -- The sqlalchemy engine. .. !! processed by numpydoc !! .. py:function:: db_session(database_engine: sqlalchemy.Engine) -> Iterator[sqlalchemy.orm.Session] Initialize the in memory db session and creates the db schema. :param database_engine: The sqlalchemy database engine returned from the `database_engine` test fixture. :type database_engine: Engine :Yields: *Session* -- The sqlalchemy session object. .. !! processed by numpydoc !! .. py:function:: psql_docker() -> Iterator[agent0.chainsync.PostgresConfig] Test fixture for running postgres in docker. :Yields: *PostgresConfig* -- The PostgresConfig. .. !! processed by numpydoc !! .. py:function:: dummy_session() -> Iterator[sqlalchemy.orm.Session] Dummy session fixture for tests. :Yields: *Session* -- A sqlalchemy session object .. !! processed by numpydoc !!