#29885: mock called never gets set after upgrade to 2.1
---------------------------------------------+------------------------
Reporter: Julz | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
after upgrading from 2.0.9 to 2.1.2 we have a problem with a test like
this:
{{{
@patch.object(SomeModelAdmin, 'action_to_mock')
def test_admin_action_is_triggered(self, action_mock):
url = reverse('admin:some_model_changelist')
data = {'action': 'action_to_mock', '_selected_action': [1, 2]}
self.client.post(url, data)
self.assertTrue(action_mock.called)
}}}
on versions <2.1 it works fine. called is set to True and the call_count
increases.
I can't find anything in the changelogs so I assume it's a bug
--
Ticket URL: <https://code.djangoproject.com/ticket/29885>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.f3a9617a9ab718713ed35fa0bf32a43f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.