#36083: LiveServerTestCase fails in parallel test runner if
django.contrib.auth.backends has not yet been imported
-------------------------------------+-------------------------------------
Reporter: Adam Zapletal | Owner: (none)
Type: Bug | Status: new
Component: Testing framework | Version: dev
Severity: Release blocker | Resolution:
Keywords: TransactionTestCase | Triage Stage: Accepted
setupclass available_apps |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam Zapletal):
I appreciate your insight here. Please know that I wasn't questioning your
approach...I'm just trying to understand the problem!
----
One point of clarification on this comment:
> Thanks for the grep -- it's true Django itself only has one test case
class in this situation, but a user could be doing this. I think there
would have been a similar problem with SeleniumTestCase if it were
supported by the parallel test runner. (It doesn't today but might in the
future.)
I was assuming that in a real project (not Django itself), the user
wouldn't have this problem. They'd be opting into setting `available_apps`
on their test class, so we can expect them to do it correctly. The
attribute is only required
[https://github.com/django/django/blob/8bee7fa45cd7bfe70b68784314e994e2d193fd70/tests/runtests.py#L314
in Django's test suite].
When I remove the linked check from `runtests.py` or set `available_apps`
to `None`, the test in question passes.
----
I'd like to hear from others as well. Do you want to ping people on this
ticket, or should we open a forum thread?
--
Ticket URL: <https://code.djangoproject.com/ticket/36083#comment:6>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/010701945db44536-b01c6cdb-6d90-4da8-995c-d4b2dfc61605-000000%40eu-central-1.amazonses.com.