Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

none pg databases #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

none pg databases #1

wants to merge 1 commit into from

Conversation

pokui
Copy link

@pokui pokui commented Sep 26, 2012

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:

import sys
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)
        ) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant