示例#1
0
def test_validate_query_parameters_failure():
    # No 'target_endpoint' in query parameters
    with pytest.raises(MLRunBadRequestError):
        _validate_query_parameters({})

    # target_endpoint unsupported
    with pytest.raises(MLRunBadRequestError):
        _validate_query_parameters({"target_endpoint": "unsupported_endpoint"})
示例#2
0
def test_validate_query_parameters_success():
    _validate_query_parameters({"target_endpoint": "list_endpoints"},
                               {"list_endpoints"})