john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

heroku tdd flask postgres sql mock

# get the local functionality working, then push and manually verify heroku, then use unit tests to mock it out

source venv/bin/activate
pip install psycopg2
pip freeze > requirements.txt


     # dev level 10k rows of postgres sql is free, https://www.heroku.com/pricing

heroku addons:add heroku-postgresql:dev
heroku pg:promote HEROKU_POSTGRESQL_COLOR   # make it the default database and activate environment variable DATABASE_URL
heroku addons



pip install  mock


# local postgres
sudo apt-get update; sudo apt-get install postgresql  # postgresql-contrib ?
sudo /etc/init.d/postgresql stop

  • « elasticsearch
  • Symlink symbolic link shortcut hard link »

Published

Mar 10, 2014

Category

python

~72 words

Tags

  • flask 2
  • heroku 4
  • mock 3
  • postgres 1
  • python 180
  • sql 18
  • tdd 2