Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Oct 5, 2021
1 parent d1bfda6 commit 2209807
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_utils.py
@@ -0,0 +1,8 @@
from fastapi.utils import get_path_param_names


def test_path_param_names():
assert get_path_param_names("/") == set()
assert get_path_param_names("/path/{param}") == {"param"}
assert get_path_param_names("/path1/{param1}/path2/{param2}") == {"param1", "param2"}
assert get_path_param_names("/path/{param:path}") == {"param"}

0 comments on commit 2209807

Please sign in to comment.