unicefuganda/rapidsms_dhis2 — pull request #1 by pokui (2012-09-26 22:44:55+00:00)
Title: none pg databases

## description

If you are not using postgres (or even psycopg2) then this code that is required by cvs (which is core to mtrack) will not work.

Add to that the problem that django 1.3 + pyscopg2 > 2.4.1 means you will not be able to run tests means that most people will be using sqlite3 as their test.db.

tests.py does not seem to have anything useful so my assumption is the utils in here are not tested.

Example snipplet into localsettings.py to use for the case mentioned above would be something like:

```python
import os
import tempfile

if 'test' in sys.argv:
for db_name in DATABASES:
DATABASES[db_name]['ENGINE']='django.db.backends.sqlite3'
DATABASES[db_name]['TEST_NAME']=os.path.join(
tempfile.gettempdir(),
'{0}.rapidsms.test.sqlite3'.format(db_name)
)

```