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

Error message for database access in setup_X is misleading #297

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

Error message for database access in setup_X is misleading #297

pelme opened this issue Dec 7, 2015 · 2 comments

Comments

@pelme
Copy link
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
Copy link
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
Copy link
Member Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants