postgres commands added

* Swtiched to Pytest
* Tests revamped to mock out subprocess and env variables
* postgres functionality added to delete, add, and update functions
and same for the other similar looking ones below