Opened 6 years ago
Last modified 6 years ago
#29885 closed Bug
mock called never gets set after upgrade to 2.1 — at Version 1
Reported by: | Julz | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 2.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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
Note:
See TracTickets
for help on using tickets.