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

Tests don't run on Django 1.5 #12

Closed
aptiko opened this issue Apr 24, 2013 · 1 comment
Closed

Tests don't run on Django 1.5 #12

aptiko opened this issue Apr 24, 2013 · 1 comment

Comments

@aptiko
Copy link
Contributor

aptiko commented Apr 24, 2013

Tests don't run on Django 1.5. It says "cannot import MasterSlaveRouter". There is some kind of circularity. When it tries to import multidb.tests.settings, it tries to import multidb.tests first—I think this is normal Python. But then multidb.tests tries to import stuff from multidb, which in turn attempts to read stuff from settings. The error occurs at line 40 of multidb/__init.__.py:

if getattr(settings, 'SLAVE_DATABASES'):

Maybe moving settings.py out of directory tests would solve the problem. If my theory is correct, however, what I can't understand is why this manifests itself only with Django 1.5; but it could be some change in the way Django imports settings.

I want to fix this, so advice would be useful.

aptiko pushed a commit to wikical/django-multidb-router that referenced this issue Jun 12, 2013
@jsocol
Copy link
Collaborator

jsocol commented Oct 31, 2013

Fixed by 7835c0c

@jsocol jsocol closed this as completed Oct 31, 2013
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

No branches or pull requests

2 participants