#17928: Tests with import time dependency on DB fail
-----------------------------------+--------------------
Reporter: boxm | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: SVN
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------
If a test has an import time dependency on a database table, the test
fails as at the point the test suite is created, the test databases have
not been
This is caused by the following around line 357 of test/simple.py:
{{{
self.setup_test_environment()
suite = self.build_suite(test_labels, extra_tests)
old_config = self.setup_databases()
result = self.run_suite(suite)
self.teardown_databases(old_config)
}}}
build_suite() is called before the databases are set up. There doesn't
seem to be any dependency on the suite in setup_databases(), so this can
be fixed by moving the setup_databases() call before the build_suite()
--
Ticket URL: <https://code.djangoproject.com/ticket/17928>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.