Skip to content

Instantly share code, notes, and snippets.

View MattFanto's full-sized avatar

Mattia Fantoni MattFanto

View GitHub Profile
@MattFanto
MattFanto / settings.py
Last active March 12, 2019 23:40 — forked from gregsadetsky/settings.py
See: http://stackoverflow.com/questions/13705328/ -- I was looking for a way to run Selenium tests for a Django app on a staging server hosted on Heroku using a PostgreSQL database. The DjangoTestSuiteRunner creates and destroys the whole database before/after testing, which would not work on Heroku where databases are added via other means (her…
import dj_database_url
TEST_DATABASES = {
'default': dj_database_url.config(env='TEST_DATABASE_URL')
}
# replace path below to point to HerokuTestSuiteRunner class
TEST_RUNNER = 'python.path.to.test_suite_runner.HerokuTestSuiteRunner'