Skip to content

Commit 7b22966

Browse files
committed
Cleaned up changes for transfer of v1 from mounted as a wsgi application fo FastAPI
1 parent 9502abe commit 7b22966

File tree

6 files changed

+0
-23
lines changed

6 files changed

+0
-23
lines changed

app/main.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import uvicorn
1111
from fastapi import FastAPI, Request, Response
1212
from fastapi.middleware.cors import CORSMiddleware
13-
# from fastapi.middleware.wsgi import WSGIMiddleware
1413
from fastapi.responses import JSONResponse
1514

1615
from .core import create_app
@@ -87,12 +86,6 @@ async def handle_validation_error(request: Request, exc: pydantic.error_wrappers
8786
APP.include_router(v1router, prefix="", tags=["v1"])
8887
APP.include_router(v2router, prefix="/v2", tags=["v2"])
8988

90-
'''
91-
# mount the existing Flask app
92-
# v1 @ /
93-
APP.mount("/", WSGIMiddleware(create_app()))
94-
'''
95-
9689

9790
# Running of app.
9891
if __name__ == "__main__":

app/router/v1/all.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#from flask import jsonify
2-
31
from ...services.location.jhu import get_category
42
from . import router
53

app/router/v1/confirmed.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# from flask import jsonify
2-
import json
3-
4-
# from ...routes import api_v1 as api
51
from ...services.location.jhu import get_category
62
from . import router
73

app/router/v1/deaths.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# from flask import jsonify
2-
3-
# from ...routes import api_v1 as api
41
from ...services.location.jhu import get_category
52
from . import router
63

app/router/v1/recovered.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# from flask import jsonify
2-
3-
# from ...routes import api_v1 as api
41
from ...services.location.jhu import get_category
52
from . import router
63

tests/test_routes.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ class FlaskRoutesTest(unittest.TestCase):
2222
Store all integration testcases in one class to ensure app context
2323
"""
2424

25-
# load app context only once.
26-
# app = app.create_app()
27-
2825
def setUp(self):
29-
# self.client = FlaskRoutesTest.app.test_client()
3026
self.asgi_client = TestClient(APP)
3127
self.date = DATETIME_STRING
3228

0 commit comments

Comments
 (0)