Skip to content

Commit

Permalink
Fix test for Flask 3
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders committed Oct 23, 2023
1 parent 2604017 commit fa203bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion connexion/apps/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _set_base_path(self, base_path: t.Optional[str] = None) -> None:
self._set_blueprint()

def _set_blueprint(self):
endpoint = flask_utils.flaskify_endpoint(self.base_path)
endpoint = flask_utils.flaskify_endpoint(self.base_path) or "/"
self.blueprint = flask.Blueprint(
endpoint,
__name__,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_api():

def test_api_base_path_slash():
api = FlaskApi(TEST_FOLDER / "fixtures/simple/basepath-slash.yaml")
assert api.blueprint.name == ""
assert api.blueprint.name == "/"
assert api.blueprint.url_prefix == ""


Expand Down

0 comments on commit fa203bd

Please sign in to comment.