def METHOD_NAME(args, error_message):
    with pytest.raises(ValidationError) as e:
        validate(args, get_template_by_id_request)
    errors = json.loads(str(e.value))
    assert errors["status_code"] == 400
    for error in errors["errors"]:
        assert error["message"] in error_message