File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff 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." )
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ def is_supported_framework(app: Any) -> bool:
2424 app_type = type (app ).__name__
2525 module_name = getattr (type (app ), "__module__" , "" ).split ("." )[0 ]
2626
27- return (module_name == "flask" and app_type == "Flask" ) or (module_name == "fastapi" and app_type == "FastAPI" )
27+ return ((module_name == "flask" and app_type == "Flask" ) or
28+ (module_name == "flask_openapi3" and app_type == "OpenAPI" ) or
29+ (module_name == "fastapi" and app_type == "FastAPI" ))
2830
2931
3032def auto_discover_app () -> Optional [Any ]:
You can’t perform that action at this time.
0 commit comments