agent0.chainsync.test_fixtures
Test fixtures for chainsync
Submodules
Functions
|
Create psql engine on local postgres container. |
|
Initialize the in memory db session and creates the db schema. |
|
Test fixture for running postgres in docker. |
|
Dummy session fixture for tests. |
Package Contents
- agent0.chainsync.test_fixtures.database_engine(psql_docker: agent0.chainsync.PostgresConfig) Iterator[sqlalchemy.Engine]
Create psql engine on local postgres container.
- Parameters:
psql_docker (PostgresConfig) – The PostgresConfig object returned by the psql_docker test fixture.
- Yields:
Engine – The sqlalchemy engine.
- agent0.chainsync.test_fixtures.db_session(database_engine: sqlalchemy.Engine) Iterator[sqlalchemy.orm.Session]
Initialize the in memory db session and creates the db schema.
- Parameters:
database_engine (Engine) – The sqlalchemy database engine returned from the database_engine test fixture.
- Yields:
Session – The sqlalchemy session object.
- agent0.chainsync.test_fixtures.psql_docker() Iterator[agent0.chainsync.PostgresConfig]
Test fixture for running postgres in docker.
- Yields:
PostgresConfig – The PostgresConfig.
- agent0.chainsync.test_fixtures.dummy_session() Iterator[sqlalchemy.orm.Session]
Dummy session fixture for tests.
- Yields:
Session – A sqlalchemy session object