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

Django 1.8 and py.test #19

Open
dmr opened this issue May 7, 2015 · 0 comments
Open

Django 1.8 and py.test #19

dmr opened this issue May 7, 2015 · 0 comments

Comments

@dmr
Copy link
Contributor

dmr commented May 7, 2015

Hi everybody,

logan works fine with django 1.8 for our project but we have one problem: pytest.

I'm not sure if this is a problem of pytest but I wanted to ask if anybody is using the combination of py.test and logan and django 1.8. Since the update we have an issue when we run the tests:

ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

We managed to integrate logan into pytest by defining a conftest.py with the following content:

from logan.runner import configure_app
from myproject.logan_runner import get_logan_kw
configure_app(**get_logan_kw())

But with the new version of either django or pytest or pytest-django something is wrong with the import ordering I guess.

I'm just curious if anybody experienced the same things and has a solution. Again, logan might work fine here so feel free to resolve this issue :)

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

1 participant