Skip to content

Commit 1364d01

Browse files
author
Jakob Zanker
committed
Add support for Flask-OpenApi3
1 parent 26df106 commit 1364d01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pytest_api_cov/frameworks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def get_framework_adapter(app: Any) -> BaseAdapter:
9595

9696
if module_name == "flask" and app_type == "Flask":
9797
return FlaskAdapter(app)
98-
if module_name == "fastapi" and app_type == "FastAPI":
98+
elif module_name == "flask_openapi3" and app_type == "OpenAPI":
99+
return FlaskAdapter(app)
100+
elif module_name == "fastapi" and app_type == "FastAPI":
99101
return FastAPIAdapter(app)
100102

101103
raise TypeError(f"Unsupported application type: {app_type}. pytest-api-coverage supports Flask and FastAPI.")

0 commit comments

Comments
 (0)