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

Detailed Description

Supply dynamic configs for the service in testsuite.

Classes

class  _ConfigDefaults

Functions

dynconf.DynamicConfig dynamic_config (request, search_path, object_substitute, cache_invalidation_state, _dynamic_config_defaults_storage, config_service_defaults, dynamic_config_changelog, _dynconf_load_json_cached, dynconf_cache_names)
 Fixture that allows to control dynamic config values used by the service.
Iterable[str] dynconf_cache_names ()
 _dynconf_json_cache ()
 _dynconf_load_json_cached (json_loads, _dynconf_json_cache)
dynconf.DynamicConfig taxi_config (dynamic_config)
 Deprecated, use dynamic_config instead.
dynconf.ConfigValuesDict dynamic_config_fallback_patch ()
 Override this fixture to replace some dynamic config values specifically for testsuite tests:
dynconf.ConfigValuesDict config_service_defaults (config_fallback_path, dynamic_config_fallback_patch)
 Fixture that returns default values for dynamic config.
_ConfigDefaults _dynamic_config_defaults_storage ()
 userver_config_dynconf_cache (service_tmpdir)
 Returns a function that adjusts the static configuration file for the testsuite.
 userver_config_dynconf_fallback (config_service_defaults)
 Returns a function that adjusts the static configuration file for the testsuite.
 userver_config_dynconf_url (mockserver_info)
 Returns a function that adjusts the static configuration file for the testsuite.
None mock_configs_service (mockserver, dynconf.DynamicConfig dynamic_config, dynconf._Changelog dynamic_config_changelog)
 Adds a mockserver handler that forwards dynamic_config to service's dynamic-config-client component.
 _userver_dynconfig_cache_control (dynconf._Changelog dynamic_config_changelog)
Callable[[], None] _check_config_marks (request, _dynamic_config_defaults_storage)

Variables

list USERVER_CONFIG_HOOKS
dict USERVER_CACHE_CONTROL_HOOKS
tuple _CHECK_CONFIG_ERROR

Function Documentation

◆ _check_config_marks()

Callable[[], None] _check_config_marks ( request,
_dynamic_config_defaults_storage )
protected

Definition at line 379 of file dynamic_config.py.

◆ _dynamic_config_defaults_storage()

_ConfigDefaults _dynamic_config_defaults_storage ( )
protected

Definition at line 211 of file dynamic_config.py.

◆ _dynconf_json_cache()

_dynconf_json_cache ( )
protected

Definition at line 116 of file dynamic_config.py.

◆ _dynconf_load_json_cached()

_dynconf_load_json_cached ( json_loads,
_dynconf_json_cache )
protected

Definition at line 121 of file dynamic_config.py.

◆ _userver_dynconfig_cache_control()

_userver_dynconfig_cache_control ( dynconf._Changelog dynamic_config_changelog)
protected

Definition at line 355 of file dynamic_config.py.

◆ dynconf_cache_names()

Iterable[str] dynconf_cache_names ( )

Definition at line 111 of file dynamic_config.py.

◆ taxi_config()

dynconf.DynamicConfig taxi_config ( dynamic_config)

Deprecated, use dynamic_config instead.

Definition at line 131 of file dynamic_config.py.

Variable Documentation

◆ _CHECK_CONFIG_ERROR

tuple pytest_userver.plugins.dynamic_config._CHECK_CONFIG_ERROR
protected
Initial value:
= (
'Your are trying to override config value using '
'@pytest.mark.config({}) '
'that does not seem to be used by your service.\n\n'
'In case you really need to disable this check please add the '
'following mark to your testcase:\n\n'
'@pytest.mark.disable_config_check'
)

Definition at line 367 of file dynamic_config.py.

◆ USERVER_CACHE_CONTROL_HOOKS

dict pytest_userver.plugins.dynamic_config.USERVER_CACHE_CONTROL_HOOKS
Initial value:
= {
'dynamic-config-client-updater': '_userver_dynconfig_cache_control',
}

Definition at line 21 of file dynamic_config.py.

◆ USERVER_CONFIG_HOOKS

list pytest_userver.plugins.dynamic_config.USERVER_CONFIG_HOOKS
Initial value:
= [
'userver_config_dynconf_cache',
'userver_config_dynconf_fallback',
'userver_config_dynconf_url',
]

Definition at line 16 of file dynamic_config.py.