#31398: multiple_database.tests.AuthTestCase doesn't flush the default database
if
transactions aren't supported.
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Hassaan
| Ali Wattoo
Type: Bug | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Hassaan Ali Wattoo):
Replying to [comment:5 Simon Charette]:
> Hassaan, you could try running the suite with MySQL's MyISAM to
reproduce locally.
Using MySQL 8.0.11 MyISAM, I ran into a separate issue. It seems that the
following line creates a record in the default database instead of 'other'
as expected.
{{{
1535. User.objects.create_user('alice', '[email protected]')
}}}
The behavior then is that the test case fails at the following assert
{{{
1546. with self.assertRaises(User.DoesNotExist):
User.objects.using('default').get(username='alice')
}}}
However, the second test case passes successfully, indicating that the
database flushes correctly. Do you have any idea why this might happen?
--
Ticket URL: <https://code.djangoproject.com/ticket/31398#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 on the web visit
https://groups.google.com/d/msgid/django-updates/067.3c20d4902082f23bc70eae45512edb16%40djangoproject.com.