Skip to content

Commit

Permalink
Assert unbound argument skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
jtc42 committed May 26, 2020
1 parent b8ed956 commit 8ae655d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_server_view_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ def f(arg: int):
assert response["input"] == input_json


def test_action_from_argarray(app, client):
def f(*args, **kwargs):
return {"args": args, "kwargs": kwargs}

GeneratedClass = builder.action_from(f)
assert GeneratedClass.__apispec__["_operations"]["post"]["_params"] == {}


def test_action_from_options(app):
def f(arg: int, kwarg: str = "default"):
return {"arg": arg, "kwarg": kwarg}
Expand Down

0 comments on commit 8ae655d

Please sign in to comment.