Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add flask blueprint spec path test #197

Merged
merged 1 commit into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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",
]