def test_cli_parse_operation_name(parser): args = parser.parse_args(["https://your_server.com", "--operation-name", "myop"]) execute_args = get_execute_args(args) assert execute_args == {"operation_name": "myop"}
def test_cli_parse_variable_value(parser, param): args = parser.parse_args(["https://your_server.com", "--variables", *param["args"]]) execute_args = get_execute_args(args) expected_variable_values = param["d"] assert execute_args == {"variable_values": expected_variable_values}
def test_cli_parse_variable_value_invalid_param(parser, param): args = parser.parse_args(["https://your_server.com", "--variables", param]) with pytest.raises(ValueError): get_execute_args(args)