#37064: SimpleTestCase._remove_databases_failures() crashes on un-wrapped
connection methods
-------------------------------------+-------------------------------------
Reporter: Rio Weber | Owner: (none)
Type: Bug | Status: new
Component: Testing framework | Version: 6.0
Severity: Normal | Resolution:
Keywords: testcase, | Triage Stage:
databases, multi-db, regression | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
I'll let other triagers chime in but to me [https://github.com/riodw
/django-remove_databases_failures-
demo/blob/3e712b13c558a43458f457ab6b7e110a56390051/demo/repro/tests.py#L16-L22
this doesn't constitute a valid reproduction case].
If you mock with Django internals in your `setUp` it's your responsibility
to restore things to how they were prior to `tearDown` exit. If you
properly do so with
{{{#!python
self.addCleanup(setattr, connection, "cursor", original_cursor)
}}}
you won't run into any problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/37064#comment:11>
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/0107019dc21fcf75-15ad22a1-2893-4d01-87ce-9d468bca0ce3-000000%40eu-central-1.amazonses.com.