openclimatefix / nowcasting_datamodel

Datamodel for the nowcasting project
6 stars 6 forks source link

Deletion risk in pytests #190

Open dfulu opened 1 year ago

dfulu commented 1 year ago

These tests use the DB_URL[_PV] environmental variables we use in multiple places. If these variables are set when these tests are run there is risk of deleting the database. I already did this to the development database.

https://github.com/openclimatefix/nowcasting_datamodel/blob/2d2d836f9705cce37e53ef40d4c0673df453fe2f/tests/conftest.py#LL53C1-L62C26

https://github.com/openclimatefix/nowcasting_datamodel/blob/2d2d836f9705cce37e53ef40d4c0673df453fe2f/tests/conftest.py#LL81C1-L90C49