userver: pytest_userver.plugins.postgresql Namespace Reference
Loading...
Searching...
No Matches
pytest_userver.plugins.postgresql Namespace Reference

Detailed Description

Plugin that imports the required fixtures to start the database and adjusts the PostgreSQL "dbconnection" static config value.

Classes

class  RegisteredNtrx
 

Functions

 userver_pg_config (pgsql_local)
 Returns a function that adjusts the static configuration file for the testsuite.
 
typing.Generator[sql.RegisteredTrx, None, None] userver_pg_trx (testpoint)
 The fixture maintains transaction fault injection state using RegisteredTrx class.
 
typing.Generator[RegisteredNtrx, None, None] userver_pg_ntrx (testpoint)
 The fixture maintains single query fault injection state using RegisteredNtrx class.
 

Variables

list pytest_plugins
 
list USERVER_CONFIG_HOOKS = ['userver_pg_config']
 

Variable Documentation

◆ pytest_plugins

list pytest_userver.plugins.postgresql.pytest_plugins
Initial value:
1= [
2 'testsuite.databases.pgsql.pytest_plugin',
3 'pytest_userver.plugins.core',
4]

Definition at line 14 of file postgresql.py.

◆ USERVER_CONFIG_HOOKS

list pytest_userver.plugins.postgresql.USERVER_CONFIG_HOOKS = ['userver_pg_config']

Definition at line 20 of file postgresql.py.