jeancochrane / jeancochrane/pytest-flask-sqlalchemy
Test Case(s)
- Dominant language
- Python
- Stars
- 253
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Dear Ms. Cochrane,
I see in some of the other issues that you typically ask for the users to run their tests against PostgreSQL. I though it might be prudent for the project to provide a branch of PyTest-Flask-SQLAlchemy that provided a standard test that users could run against their own database. One could point users with issues to the test and ask them to run it first when reporting an issue. I have provided the code for such a test in my fork on a branch called [testing](https://github.com/manaikan/pytest-flask-sqlalchemy/tree/testing).
Github, to my knowledge, does not allow one to create a PR pushing a branch from one repository to another, so you would have to pull this across if you wanted it for the project.
To make testing PyTest-Flask-SQLAlchemy as convenient as possible I have added a command line interface to the testing suite that creates a database and populates the schema prior to one running the tests and then removes it afterwards. The tests themselves take an additional argument that specifies the database so that this is not hard coded. So a typical use case would be as follows :
python -m flask_test create DATABASE+PROTOCOL://HOSTNAME:HOSTPORT DATASTORE
python -m flask_test schema DATABASE+PROTOCOL://HOSTNAME:HOSTPORT/DATASTORE
pytest --database DATABASE+PROTOCOL://HOSTNAME:HOSTPORT/DATASTORE
python -m flask_test create DATABASE+PROTOCOL://HOSTNAME:HOSTPORT/DATASTORE
Regards,
Carel van Dam
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.