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

Error message for database access in setup_X is misleading #297

Open
pelme opened this Issue Dec 7, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@pelme
Member

pelme commented Dec 7, 2015

The error message when triggering the database from setup_X methods should clearly point out that database access from such methods is not supported, rather than advising to put the django_db marker on the test.

See http://stackoverflow.com/questions/34089425/django-pytest-setup-method-database-issue for original problem.

@TauPan

This comment has been minimized.

Show comment
Hide comment
@TauPan

TauPan Dec 10, 2015

Contributor

May I also suggest some documentation, similar to what @pelme has written in his very helpful SO answer. At least I couldn't find that setup-methods unsupported in the pytest-django documentation anywhere.

Contributor

TauPan commented Dec 10, 2015

May I also suggest some documentation, similar to what @pelme has written in his very helpful SO answer. At least I couldn't find that setup-methods unsupported in the pytest-django documentation anywhere.

@pelme

This comment has been minimized.

Show comment
Hide comment
@pelme

pelme Dec 10, 2015

Member

Yes that would be very helpful. If you (or anyone else) are interested in contributing a documentation change based on my SO answer, that would be very helpful!

Member

pelme commented Dec 10, 2015

Yes that would be very helpful. If you (or anyone else) are interested in contributing a documentation change based on my SO answer, that would be very helpful!

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