Skip to content

Commit 62e2730

Browse files
committed
Test non-allowed values for actions with no input.
1 parent 3b0b81b commit 62e2730

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_actions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ def test_no_args(client):
7373
run({}) # an empty dict should be OK
7474
run(None) # it should also be OK to call it with None
7575
# Calling with no payload is equivalent to None
76+
with pytest.raises(RuntimeError, match="422"):
77+
run(10) # the payload must be a dict - this will error.
78+
with pytest.raises(RuntimeError, match="422"):
79+
run({"key": "value"}) # non-empty dicts should cause an error.
7680

7781

7882
def test_only_kwargs(client):

0 commit comments

Comments
 (0)