swh_local_vault_config = {'vault': {'args': {'cache': {'args': {'allow_delete': True, 'root': '/tmp/pytest-of-jenkins/pytest-0/test_client_prog...-of-jenkins/pytest-0/test_client_progress_notfound_0', 'slicing': '0:1/1:5'}, 'cls': 'pathslicing'}}}, 'cls': 'local'}}
@pytest.fixture
def async_app(swh_local_vault_config: Dict[str, Any],) -> VaultServerApp:
"""Instantiate the vault server application.
Note: This requires the db setup to run (fixture swh_vault in charge of this)
"""
> return make_app(swh_local_vault_config)
.tox/py3/lib/python3.7/site-packages/swh/vault/tests/test_server.py:53:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/vault/api/server.py:101: in make_app
backend_factory=lambda: get_vault(config_ok),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Application 0x7f6cf60c4668>
middlewares = (<function negotiation_middleware.<locals>.factory at 0x7f6cf6062e18>, <function error_middleware at 0x7f6cf6bccae8>)
args = ('swh.vault.api.server',)
kwargs = {'backend_class': <class 'swh.vault.interface.VaultInterface'>, 'backend_factory': <function make_app.<locals>.<lambda> at 0x7f6cf6062c80>}
renderers = OrderedDict([('application/json', <function render_json at 0x7f6cf6bcc9d8>), ('application/x-msgpack', <function render_msgpack at 0x7f6cf6c44f28>)])
nego_middleware = <function negotiation_middleware.<locals>.factory at 0x7f6cf6062e18>
def __init__(self, *args, middlewares=(), **kwargs):
middlewares = (error_middleware,) + middlewares
# renderers are sorted in order of increasing desirability (!)
# see mimeparse.best_match() docstring.
renderers = OrderedDict(
[
("application/json", render_json),
("application/x-msgpack", render_msgpack),
]
)
nego_middleware = negotiation.negotiation_middleware(
renderers=renderers, force_rendering=True
)
middlewares = (nego_middleware,) + middlewares
> super().__init__(*args, middlewares=middlewares, **kwargs)
E TypeError: __init__() got an unexpected keyword argument 'backend_class'
.tox/py3/lib/python3.7/site-packages/swh/core/api/asynchronous.py:95: TypeError
TEST RESULT
TEST RESULT
- Run At
- Oct 22 2020, 12:17 PM