def test_parameter_schema_str(): p = Parameter(name="x", description="the x value.", schema="number") assert p.to_dict() == { "name": "x", "description": "the x value.", "schema": { "type": "number" } }
def test_parameter_schema_default_none(): p = Parameter(name="x", description="the x value.", schema="number", default=None) assert p.to_dict() == { "name": "x", "description": "the x value.", "schema": { "type": "number" }, "optional": True, "default": None }
def test_parameter_default(): p = Parameter(name="x") assert p.to_dict() == {"name": "x", "description": "x", "schema": {}}