(base=None, exclude=None, **params)
| 305 | |
| 306 | |
| 307 | def caches_setting_for_tests(base=None, exclude=None, **params): |
| 308 | # `base` is used to pull in the memcached config from the original |
| 309 | # settings, `exclude` is a set of cache names denoting which |
| 310 | # `_caches_setting_base` keys should be omitted. `params` are test specific |
| 311 | # overrides and `_caches_settings_base` is the base config for the tests. |
| 312 | # This results in the following search order: |
| 313 | # params -> _caches_setting_base -> base |
| 314 | base = base or {} |
| 315 | exclude = exclude or set() |
| 316 | setting = {k: base.copy() for k in _caches_setting_base if k not in exclude} |
| 317 | for key, cache_params in setting.items(): |
| 318 | cache_params.update(_caches_setting_base[key]) |
| 319 | cache_params.update(params) |
| 320 | return setting |
| 321 | |
| 322 | |
| 323 | class BaseCacheTests: |
no test coverage detected