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

Fixup DJANGO_SETTINGS_SKIP_LOCAL in tests #3899

Merged
merged 1 commit into from Apr 17, 2018

Conversation

Projects
None yet
4 participants
@xrmx
Contributor

xrmx commented Apr 4, 2018

The import path for the local_settings should be relative to the
test module and not absolute otherwise the import will fail.

Fixup DJANGO_SETTINGS_SKIP_LOCAL in tests
The import path for the local_settings should be relative to the
test module and not absolute otherwise the import will fail.
@humitos

This comment has been minimized.

Member

humitos commented Apr 4, 2018

What was the error that you were receiving without this patch?

How I can reproduce it?

@xrmx

This comment has been minimized.

Contributor

xrmx commented Apr 5, 2018

Just add some options in local_settings.py, run the tests and you see they are ignored. In my case i've added a DATABASES entry, removed DJANGO_SETTINGS_SKIP_LOCAL=False from tox.ini and run tox.

@xrmx

This comment has been minimized.

Contributor

xrmx commented Apr 11, 2018

And also settings/dev.py use the dotted import :)

@xrmx

This comment has been minimized.

Contributor

xrmx commented Apr 17, 2018

Friendly ping, this is a really trivial issue :)

@agjohnson

This comment has been minimized.

Contributor

agjohnson commented Apr 17, 2018

This looks fine, as it mimics dev.py. It's better to rely on a custom settings file for your tests however, not local_settings.

@agjohnson agjohnson merged commit 3934c35 into rtfd:master Apr 17, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@xrmx xrmx deleted the italia:testskiplocal branch May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment