Github   Telegram
Loading...
Searching...
No Matches
Namespaces | Functions

Fixtures to use with testsuite. More...

+ Collaboration diagram for Fixtures:

Namespaces

namespace  pytest_userver.plugins.core
 Python plugin that provides core fixtures for functional tests with testsuite; see Functional service tests (testsuite) for an introduction.
 
namespace  pytest_userver.plugins.grpc
 Python plugin that provides gRPC fixtures for functional tests with testsuite; see Functional service tests (testsuite) for an introduction.
 

Functions

pathlib.Path pytest_userver.plugins.base.service_source_dir (pytestconfig)
 Returns the path to the service source directory that is set by command line --service-source-dir option.
 
pathlib.Path pytest_userver.plugins.base.build_dir (pytestconfig)
 Returns the build directory set by command line --build-dir option.
 
pathlib.Path pytest_userver.plugins.base.service_binary (pytestconfig)
 Returns the path to service binary set by command line --service-binary option.
 
int pytest_userver.plugins.base.service_port (pytestconfig)
 Returns the main listener port number of the service set by command line --service-port option.
 
int pytest_userver.plugins.base.monitor_port (pytestconfig)
 Returns the monitor listener port number of the service set by command line --monitor-port option.
 
InvalidationState pytest_userver.plugins.caches.cache_invalidation_state ()
 A fixture for notifying the service of changes in cache data sources.
 
pathlib.Path pytest_userver.plugins.config.service_config_path (pytestconfig)
 Returns the path to service.yaml file set by command line --service-config option.
 
typing.Optional[pathlib.Path] pytest_userver.plugins.config.service_config_vars_path (pytestconfig)
 Returns the path to config_vars.yaml file set by command line --service-config-vars option.
 
typing.Optional[pathlib.Path] pytest_userver.plugins.config.service_secdist_path (pytestconfig)
 Returns the path to secure_data.json file set by command line --service-secdist option.
 
pathlib.Path pytest_userver.plugins.config.config_fallback_path (pytestconfig)
 Returns the path to dynamic config fallback file set by command line --config-fallback option.
 
def pytest_userver.plugins.config.service_tmpdir (service_binary, tmp_path_factory)
 Returns the path for temporary files.
 
pathlib.Path pytest_userver.plugins.config.service_config_path_temp (service_tmpdir, service_config_yaml)
 Dumps the contents of the service_config_yaml into a static config for testsuite and returns the path to the config file.
 
dict pytest_userver.plugins.config.service_config_yaml (_service_config)
 Returns the static config values after the USERVER_CONFIG_HOOKS were applied (if any).
 
dict pytest_userver.plugins.config.service_config_vars (_service_config)
 Returns the static config variables (config_vars.yaml) values after the USERVER_CONFIG_HOOKS were applied (if any).
 
def pytest_userver.plugins.config.userver_config_base (service_port, monitor_port)
 Returns a function that adjusts the static configuration file for testsuite.
 
def pytest_userver.plugins.config.userver_config_logging (pytestconfig)
 Returns a function that adjusts the static configuration file for testsuite.
 
def pytest_userver.plugins.config.userver_config_testsuite (mockserver_info)
 Returns a function that adjusts the static configuration file for testsuite.
 
def pytest_userver.plugins.config.userver_config_secdist (service_secdist_path)
 Returns a function that adjusts the static configuration file for testsuite.
 
pathlib.Path pytest_userver.plugins.dumps.userver_dumps_root (tmp_path_factory)
 The directory which the service will use for cache dumps.
 
def pytest_userver.plugins.dumps.read_latest_dump (userver_dumps_root)
 Read the latest dump produced by a specified dumper.
 
def pytest_userver.plugins.dumps.cleanup_userver_dumps (userver_dumps_root, request)
 To avoid leaking dumps between tests, cache_dump_dir must be cleaned after each test.
 
DynamicConfig pytest_userver.plugins.dynamic_config.dynamic_config (request, search_path, load_json, object_substitute, config_service_defaults, cache_invalidation_state)
 Fixture that allows to control dynamic config values used by the service.
 
typing.Dict[str, typing.Any] pytest_userver.plugins.dynamic_config.config_service_defaults (config_fallback_path)
 Fixture that returns default values for dynamic config.
 
def pytest_userver.plugins.dynamic_config.userver_config_dynconf_fallback (pytestconfig, config_fallback_path)
 Returns a function that adjusts the static configuration file for the testsuite.
 
def pytest_userver.plugins.dynamic_config.userver_config_dynconf_url (mockserver_info)
 Returns a function that adjusts the static configuration file for the testsuite.
 
None pytest_userver.plugins.dynamic_config.mock_configs_service (mockserver, dynamic_config)
 Adds a mockserver handler that forwards dynamic_config to service's dynamic-config-client component.
 
int pytest_userver.plugins.grpc_client.grpc_service_port (service_config_yaml)
 Returns the gRPC listener port number of the service that is set in the static configuration file.
 
str pytest_userver.plugins.grpc_client.grpc_service_endpoint (grpc_service_port)
 Returns the gRPC endpoint of the service.
 
float pytest_userver.plugins.grpc_client.grpc_service_timeout (pytestconfig)
 Returns the gRPC timeout for the service that is set by the command line option --service-timeout.
 
def pytest_userver.plugins.grpc_client.grpc_channel (grpc_service_endpoint, grpc_service_deps, grpc_service_timeout, _grpc_session_channel)
 Returns the gRPC channel configured by the parameters from the grpc_service_endpoint fixture.
 
def pytest_userver.plugins.grpc_client.grpc_service_deps (service_client)
 gRPC service dependencies hook.
 
str pytest_userver.plugins.grpc_mockserver.grpc_mockserver_endpoint (pytestconfig, _grpc_mockserver_and_port)
 Returns the gRPC endpoint to start the mocking server that is set by command line --grpc-mockserver-host and --grpc-mockserver-port options.
 
def pytest_userver.plugins.grpc_mockserver.grpc_mockserver (_grpc_mockserver_and_port)
 Returns the gRPC mocking server.
 
def pytest_userver.plugins.grpc_mockserver.create_grpc_mock ()
 Creates the gRPC mock server for the provided type.
 
def pytest_userver.plugins.mongo.userver_mongo_config (mongo_connection_info)
 Returns a function that adjusts the static configuration file for the testsuite.
 
def pytest_userver.plugins.postgresql.userver_pg_config (pgsql_local)
 Returns a function that adjusts the static configuration file for the testsuite.
 
def pytest_userver.plugins.service.service_env ()
 Override this to pass extra environment variables to the service.
 
typing.Optional[str] pytest_userver.plugins.service.service_http_ping_url (service_config_yaml, service_baseurl)
 Returns the service HTTP ping URL that is used by the testsuite to detect that the service is ready to work.
 
net.HealthChecks pytest_userver.plugins.service.service_non_http_health_checks (service_config_yaml)
 Returns a health checks info.
 
def pytest_userver.plugins.service.service_daemon (pytestconfig, create_daemon_scope, service_env, service_http_ping_url, service_config_path_temp, service_config_yaml, service_binary, service_non_http_health_checks, testsuite_logger, _userver_log_handler)
 Configures the health checking to use service_http_ping_url fixture value if it is not None; otherwise uses the service_non_http_health_checks info.
 
None pytest_userver.plugins.service_client.extra_client_deps ()
 Service client dependencies hook.
 
None pytest_userver.plugins.service_client.auto_client_deps (request)
 Service client dependencies hook that knows about pgsql, mongodb, clickhouse, rabbitmq, redis_store dependencies.
 
client.Client pytest_userver.plugins.service_client.service_client (ensure_daemon_started, service_daemon, mock_configs_service, cleanup_userver_dumps, extra_client_deps, auto_client_deps, client.TestsuiteClientConfig _testsuite_client_config, _service_client_base, _service_client_testsuite)
 Main fixture that provides access to userver based service.
 
client.ClientMonitor pytest_userver.plugins.service_client.monitor_client (service_client, service_client_options, mockserver, str monitor_baseurl, client.TestsuiteClientConfig _testsuite_client_config)
 Main fixture that provides access to userver monitor listener.
 
str pytest_userver.plugins.service_client.service_baseurl (service_port)
 Returns the main listener URL of the service.
 
str pytest_userver.plugins.service_client.monitor_baseurl (monitor_port)
 Returns the main monitor URL of the service.
 
def pytest_userver.plugins.testpoint.userver_config_testpoint (mockserver_info)
 Returns a function that adjusts the static configuration file for the testsuite.
 

Detailed Description

Fixtures to use with testsuite.

Function Documentation

◆ auto_client_deps()

None pytest_userver.plugins.service_client.auto_client_deps (   request)

Service client dependencies hook that knows about pgsql, mongodb, clickhouse, rabbitmq, redis_store dependencies.

To add some other dependencies prefer overriding the client_deps() fixture.

Definition at line 32 of file service_client.py.

◆ build_dir()

pathlib.Path pytest_userver.plugins.base.build_dir (   pytestconfig)

Returns the build directory set by command line --build-dir option.

Override this fixture to change the way the build directory is detected by the testsuite.

Definition at line 57 of file base.py.

◆ cache_invalidation_state()

InvalidationState pytest_userver.plugins.caches.cache_invalidation_state ( )

A fixture for notifying the service of changes in cache data sources.

Intended to be used by other fixtures that represent those data sources, not by tests directly.

Definition at line 50 of file caches.py.

◆ cleanup_userver_dumps()

def pytest_userver.plugins.dumps.cleanup_userver_dumps (   userver_dumps_root,
  request 
)

To avoid leaking dumps between tests, cache_dump_dir must be cleaned after each test.

To observe the dumps, add a final time.sleep(1000000) to your test locally. The returned function may also be used to clean dumps manually as appropriate.

See also
userver::dump::Dumper

Definition at line 54 of file dumps.py.

◆ config_fallback_path()

pathlib.Path pytest_userver.plugins.config.config_fallback_path (   pytestconfig)

Returns the path to dynamic config fallback file set by command line --config-fallback option.

Override this fixture to change the way path to dynamic config fallback is provided.

Definition at line 146 of file config.py.

◆ config_service_defaults()

typing.Dict[str, typing.Any] pytest_userver.plugins.dynamic_config.config_service_defaults (   config_fallback_path)

Fixture that returns default values for dynamic config.

You may override it in your local conftest.py or fixture:

@pytest.fixture(scope='session')
def config_service_defaults():
with open('defaults.json') as fp:
return json.load(fp)

Definition at line 126 of file dynamic_config.py.

◆ create_grpc_mock()

def pytest_userver.plugins.grpc_mockserver.create_grpc_mock ( )

Creates the gRPC mock server for the provided type.

@pytest.fixture(scope='session')
def mock_grpc_greeter_session(
greeter_services, grpc_mockserver, create_grpc_mock,
):
mock = create_grpc_mock(greeter_services.GreeterServiceServicer)
greeter_services.add_GreeterServiceServicer_to_server(
mock.servicer, grpc_mockserver,
)
return mock
@pytest.fixture
def mock_grpc_greeter(mock_grpc_greeter_session):
with mock_grpc_greeter_session.mock() as mock:
yield mock

Definition at line 104 of file grpc_mockserver.py.

◆ dynamic_config()

DynamicConfig pytest_userver.plugins.dynamic_config.dynamic_config (   request,
  search_path,
  load_json,
  object_substitute,
  config_service_defaults,
  cache_invalidation_state 
)

Fixture that allows to control dynamic config values used by the service.

After change to the config, be sure to call:

await service_client.update_server_state()

HTTP client requests call it automatically before each request.

Definition at line 83 of file dynamic_config.py.

◆ extra_client_deps()

None pytest_userver.plugins.service_client.extra_client_deps ( )

Service client dependencies hook.

Feel free to override, e.g.:

@pytest.fixture
def extra_client_deps(some_fixtures_to_wait_before_service_start):
pass

Definition at line 18 of file service_client.py.

◆ grpc_channel()

def pytest_userver.plugins.grpc_client.grpc_channel (   grpc_service_endpoint,
  grpc_service_deps,
  grpc_service_timeout,
  _grpc_session_channel 
)

Returns the gRPC channel configured by the parameters from the grpc_service_endpoint fixture.

Definition at line 67 of file grpc_client.py.

◆ grpc_mockserver()

def pytest_userver.plugins.grpc_mockserver.grpc_mockserver (   _grpc_mockserver_and_port)

Returns the gRPC mocking server.

Override this fixture to change the way the gRPC mocking server is started by the testsuite.

@pytest.fixture(scope='session')
def mock_grpc_greeter_session(
greeter_services, grpc_mockserver, create_grpc_mock,
):
mock = create_grpc_mock(greeter_services.GreeterServiceServicer)
greeter_services.add_GreeterServiceServicer_to_server(
mock.servicer, grpc_mockserver,
)
return mock
@pytest.fixture
def mock_grpc_greeter(mock_grpc_greeter_session):
with mock_grpc_greeter_session.mock() as mock:
yield mock

Definition at line 82 of file grpc_mockserver.py.

◆ grpc_mockserver_endpoint()

str pytest_userver.plugins.grpc_mockserver.grpc_mockserver_endpoint (   pytestconfig,
  _grpc_mockserver_and_port 
)

Returns the gRPC endpoint to start the mocking server that is set by command line --grpc-mockserver-host and --grpc-mockserver-port options.

Override this fixture to change the way the gRPC endpoint is detected by the testsuite.

USERVER_CONFIG_HOOKS = ['prepare_service_config']
@pytest.fixture(scope='session')
def prepare_service_config(grpc_mockserver_endpoint):
def patch_config(config, config_vars):
components = config['components_manager']['components']
components['greeter-client']['endpoint'] = grpc_mockserver_endpoint
return patch_config

Definition at line 59 of file grpc_mockserver.py.

◆ grpc_service_deps()

def pytest_userver.plugins.grpc_client.grpc_service_deps (   service_client)

gRPC service dependencies hook.

Feel free to override it.

Definition at line 93 of file grpc_client.py.

◆ grpc_service_endpoint()

str pytest_userver.plugins.grpc_client.grpc_service_endpoint (   grpc_service_port)

Returns the gRPC endpoint of the service.

Override this fixture to change the way the gRPC endpoint is retrieved by the testsuite for tests.

Definition at line 34 of file grpc_client.py.

◆ grpc_service_port()

int pytest_userver.plugins.grpc_client.grpc_service_port (   service_config_yaml)

Returns the gRPC listener port number of the service that is set in the static configuration file.

Override this fixture to change the way the gRPC listener port number is retrieved by the testsuite for tests.

Definition at line 17 of file grpc_client.py.

◆ grpc_service_timeout()

float pytest_userver.plugins.grpc_client.grpc_service_timeout (   pytestconfig)

Returns the gRPC timeout for the service that is set by the command line option --service-timeout.

Override this fixture to change the way the gRPC timeout is set.

Definition at line 47 of file grpc_client.py.

◆ mock_configs_service()

None pytest_userver.plugins.dynamic_config.mock_configs_service (   mockserver,
  dynamic_config 
)

Adds a mockserver handler that forwards dynamic_config to service's dynamic-config-client component.

Definition at line 225 of file dynamic_config.py.

◆ monitor_baseurl()

str pytest_userver.plugins.service_client.monitor_baseurl (   monitor_port)

Returns the main monitor URL of the service.

Override this fixture to change the main monitor URL that the testsuite uses for tests.

Definition at line 173 of file service_client.py.

◆ monitor_client()

client.ClientMonitor pytest_userver.plugins.service_client.monitor_client (   service_client,
  service_client_options,
  mockserver,
str  monitor_baseurl,
client.TestsuiteClientConfig  _testsuite_client_config 
)

Main fixture that provides access to userver monitor listener.

async def test_engine_metrics(service_client, monitor_client):
metric = await monitor_client.single_metric(
'engine.task-processors.tasks.finished',
labels={'task_processor': 'main-task-processor'},
)
assert metric.value > 0
assert metric.labels == {'task_processor': 'main-task-processor'}
metrics_dict = await monitor_client.metrics(
prefix='http.', labels={'http_path': '/ping'},
)
assert metrics_dict
assert 'http.handler.cancelled-by-deadline' in metrics_dict
assert (
metrics_dict.value_at(
'http.handler.in-flight',
labels={'http_path': '/ping', 'http_handler': 'handler-ping'},
)
== 0
)
assert (
metrics_dict.value_at(
'http.handler.in-flight',
labels={'http_handler': 'handler-ping', 'http_path': '/ping'},
)
== 0
)

Definition at line 96 of file service_client.py.

◆ monitor_port()

int pytest_userver.plugins.base.monitor_port (   pytestconfig)

Returns the monitor listener port number of the service set by command line --monitor-port option.

Override this fixture to change the way the monitor listener port number is detected by testsuite.

Definition at line 98 of file base.py.

◆ read_latest_dump()

def pytest_userver.plugins.dumps.read_latest_dump (   userver_dumps_root)

Read the latest dump produced by a specified dumper.

See also
userver::dump::Dumper

Definition at line 25 of file dumps.py.

◆ service_baseurl()

str pytest_userver.plugins.service_client.service_baseurl (   service_port)

Returns the main listener URL of the service.

Override this fixture to change the main listener URL that the testsuite uses for tests.

Definition at line 160 of file service_client.py.

◆ service_binary()

pathlib.Path pytest_userver.plugins.base.service_binary (   pytestconfig)

Returns the path to service binary set by command line --service-binary option.

Override this fixture to change the way the path to service binary is detected by the testsuite.

Definition at line 70 of file base.py.

◆ service_client()

client.Client pytest_userver.plugins.service_client.service_client (   ensure_daemon_started,
  service_daemon,
  mock_configs_service,
  cleanup_userver_dumps,
  extra_client_deps,
  auto_client_deps,
client.TestsuiteClientConfig  _testsuite_client_config,
  _service_client_base,
  _service_client_testsuite 
)

Main fixture that provides access to userver based service.

async def test_ping(service_client):
response = await service_client.get('/ping')
assert response.status == 200

Definition at line 68 of file service_client.py.

◆ service_config_path()

pathlib.Path pytest_userver.plugins.config.service_config_path (   pytestconfig)

Returns the path to service.yaml file set by command line --service-config option.

Override this fixture to change the way path to service.yaml is provided.

Definition at line 105 of file config.py.

◆ service_config_path_temp()

pathlib.Path pytest_userver.plugins.config.service_config_path_temp (   service_tmpdir,
  service_config_yaml 
)

Dumps the contents of the service_config_yaml into a static config for testsuite and returns the path to the config file.

Definition at line 172 of file config.py.

◆ service_config_vars()

dict pytest_userver.plugins.config.service_config_vars (   _service_config)

Returns the static config variables (config_vars.yaml) values after the USERVER_CONFIG_HOOKS were applied (if any).

Definition at line 207 of file config.py.

◆ service_config_vars_path()

typing.Optional[pathlib.Path] pytest_userver.plugins.config.service_config_vars_path (   pytestconfig)

Returns the path to config_vars.yaml file set by command line --service-config-vars option.

Override this fixture to change the way path to config_vars.yaml is provided.

Definition at line 118 of file config.py.

◆ service_config_yaml()

dict pytest_userver.plugins.config.service_config_yaml (   _service_config)

Returns the static config values after the USERVER_CONFIG_HOOKS were applied (if any).

Definition at line 196 of file config.py.

◆ service_daemon()

def pytest_userver.plugins.service.service_daemon (   pytestconfig,
  create_daemon_scope,
  service_env,
  service_http_ping_url,
  service_config_path_temp,
  service_config_yaml,
  service_binary,
  service_non_http_health_checks,
  testsuite_logger,
  _userver_log_handler 
)

Configures the health checking to use service_http_ping_url fixture value if it is not None; otherwise uses the service_non_http_health_checks info.

Starts the service daemon.

Definition at line 132 of file service.py.

◆ service_env()

def pytest_userver.plugins.service.service_env ( )

Override this to pass extra environment variables to the service.

@pytest.fixture(scope='session')
def service_env(redis_sentinels):
secdist_config = {
'redis_settings': {
'taxi-tmp': {
'password': '',
'sentinels': redis_sentinels,
'shards': [{'name': 'test_master0'}],
},
},
}
return {'SECDIST_CONFIG': json.dumps(secdist_config)}

Definition at line 84 of file service.py.

◆ service_http_ping_url()

typing.Optional[str] pytest_userver.plugins.service.service_http_ping_url (   service_config_yaml,
  service_baseurl 
)

Returns the service HTTP ping URL that is used by the testsuite to detect that the service is ready to work.

Returns None if there's no such URL.

By default attempts to find server::handlers::Ping component by "handler-ping" name in static config. Override this fixture to change the behavior.

Definition at line 95 of file service.py.

◆ service_non_http_health_checks()

net.HealthChecks pytest_userver.plugins.service.service_non_http_health_checks (   service_config_yaml)

Returns a health checks info.

By default returns pytest_userver.utils.net.get_health_checks_info().

Override this fixture to change the way testsuite detects the tested service being alive.

Definition at line 116 of file service.py.

◆ service_port()

int pytest_userver.plugins.base.service_port (   pytestconfig)

Returns the main listener port number of the service set by command line --service-port option.

Override this fixture to change the way the main listener port number is detected by the testsuite.

Definition at line 84 of file base.py.

◆ service_secdist_path()

typing.Optional[pathlib.Path] pytest_userver.plugins.config.service_secdist_path (   pytestconfig)

Returns the path to secure_data.json file set by command line --service-secdist option.

Override this fixture to change the way path to secure_data.json is provided.

Definition at line 132 of file config.py.

◆ service_source_dir()

pathlib.Path pytest_userver.plugins.base.service_source_dir (   pytestconfig)

Returns the path to the service source directory that is set by command line --service-source-dir option.

Override this fixture to change the way the path to the service source directory is detected by testsuite.

Definition at line 43 of file base.py.

◆ service_tmpdir()

def pytest_userver.plugins.config.service_tmpdir (   service_binary,
  tmp_path_factory 
)

Returns the path for temporary files.

The path is the same for the whole session and files are not removed (at least by this fixture) between tests.

Definition at line 160 of file config.py.

◆ userver_config_base()

def pytest_userver.plugins.config.userver_config_base (   service_port,
  monitor_port 
)

Returns a function that adjusts the static configuration file for testsuite.

Sets the server.listener.port to listen on service_port fixture value; sets the server.listener-monitor.port to listen on monitor_port fixture value.

Definition at line 263 of file config.py.

◆ userver_config_dynconf_fallback()

def pytest_userver.plugins.dynamic_config.userver_config_dynconf_fallback (   pytestconfig,
  config_fallback_path 
)

Returns a function that adjusts the static configuration file for the testsuite.

Sets the fallback-path of the dynamic-config-fallbacks and dynamic-config-fallbacks to the value of config_fallback_path fixture.

Definition at line 174 of file dynamic_config.py.

◆ userver_config_dynconf_url()

def pytest_userver.plugins.dynamic_config.userver_config_dynconf_url (   mockserver_info)

Returns a function that adjusts the static configuration file for the testsuite.

Sets the dynamic-config-client.config-url to the value of mockserver configs-service, so that the mock_configs_service fixture could work.

Definition at line 203 of file dynamic_config.py.

◆ userver_config_logging()

def pytest_userver.plugins.config.userver_config_logging (   pytestconfig)

Returns a function that adjusts the static configuration file for testsuite.

Sets the logging.loggers.default to log to @stderr with level set from --service-log-level pytest configuration option.

Definition at line 289 of file config.py.

◆ userver_config_secdist()

def pytest_userver.plugins.config.userver_config_secdist (   service_secdist_path)

Returns a function that adjusts the static configuration file for testsuite.

Sets the default-secdist-provider.config to the value of service_secdist_path fixture.

Definition at line 336 of file config.py.

◆ userver_config_testpoint()

def pytest_userver.plugins.testpoint.userver_config_testpoint (   mockserver_info)

Returns a function that adjusts the static configuration file for the testsuite.

Sets the tests-control.skip-unregistered-testpoints to True.

Definition at line 53 of file testpoint.py.

◆ userver_config_testsuite()

def pytest_userver.plugins.config.userver_config_testsuite (   mockserver_info)

Returns a function that adjusts the static configuration file for testsuite.

Sets the testsuite-enabled in config_vars.yaml to True; sets the tests-control.testpoint-url to mockserver URL.

Definition at line 315 of file config.py.

◆ userver_dumps_root()

pathlib.Path pytest_userver.plugins.dumps.userver_dumps_root (   tmp_path_factory)

The directory which the service will use for cache dumps.

Dumps of individual components will be stored in {userver_dumps_root}/{component-name}/{datetime}-v{format-version}

See also
userver::dump::Dumper

Definition at line 11 of file dumps.py.

◆ userver_mongo_config()

def pytest_userver.plugins.mongo.userver_mongo_config (   mongo_connection_info)

Returns a function that adjusts the static configuration file for the testsuite.

Sets the dbconnection of to the testsuite started Mongo credentials if the dbconnection starts with mongodb://.

Definition at line 21 of file mongo.py.

◆ userver_pg_config()

def pytest_userver.plugins.postgresql.userver_pg_config (   pgsql_local)

Returns a function that adjusts the static configuration file for the testsuite.

Sets the dbconnection to the testsuite started PostgreSQL credentials if there's only one dbconnection in static config.

Definition at line 19 of file postgresql.py.