pytest-flask-sqlalchemy
pytest-flask-sqlalchemy copied to clipboard
Running with FastAPI
Helllo,
I actually use FastAPI instead of Flask and didn't find anything similar to your lib for FastAPI. Looking at your source code, although I see a requirement for Flask on setup.py, I see no real use of it along the implementation files.
Does this mean I can use this with FastAPI?
In case not, I have the following question:
- What are the changes needed to do it?
- Do you plan to do it or are you open to let somebody do it?
Thank you so much!
I adapted the db
fixture code to work with SQLAlchemy here: https://github.com/compute-tooling/compute-studio/blob/fa1b4ede696b12b5676e277b80dce1ec16c44a59/workers/cs_workers/services/api/tests/conftest.py#L28-L81
As you can see there are some things there like handling migrations and clearing tables, etc. after the test finishes that I haven't done. Maybe this will give you a place to start.