Skip to content

Commit

Permalink
add flask blueprint spec path test (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
kemingy committed Jan 29, 2022
1 parent e8d8851 commit a4f5321
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
@pytest.mark.parametrize(
"api",
[
flask_api,
flask_bp_api,
flask_view_api,
falcon_api,
starlette_api,
pytest.param(flask_api, id="flask"),
pytest.param(flask_bp_api, id="flask_blueprint"),
pytest.param(flask_view_api, id="flask_view"),
pytest.param(starlette_api, id="starlette"),
pytest.param(falcon_api, id="falcon"),
],
)
def test_plugin_spec(api):
Expand Down
6 changes: 5 additions & 1 deletion tests/test_plugin_flask_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from spectree import Response, SpecTree

from .common import JSON, Cookies, Headers, Query, Resp, StrDict, api_tag
from .common import JSON, Cookies, Headers, Query, Resp, StrDict, api_tag, get_paths


def before_handler(req, resp, err, _):
Expand Down Expand Up @@ -254,3 +254,7 @@ def test_flask_doc_prefix(test_client_and_api, prefix):

resp = client.get(prefix + "/apidoc/swagger")
assert resp.status_code == 200

assert get_paths(api.spec) == [
prefix + "/ping",
]

0 comments on commit a4f5321

Please sign in to comment.