def test_load_config(mocker, value, expected): ctx = mocker.Mock() build = mocker.patch("vault_cli.settings.build_config_from_files", return_value={"a": "b"}) cli.load_config(ctx, None, value) assert ctx.default_map == {"a": "b"} build.assert_called_with(*expected)
def test_load_config_no_config(mocker): ctx = mocker.Mock() cli.load_config(ctx, None, "no") assert ctx.default_map == {}