예제 #1
0
 def myhandler(sender, action, request, queryset, **kwargs):
     myhandler.invoked = True
     self.assertEqual(action, self.action_name)
     self.assertSequenceEqual(
         queryset.order_by('id').values_list('id', flat=True),
         sorted(self._selected_values))
     raise ActionInterrupted(self.MESSAGE)
예제 #2
0
 def _handler(*args, **kwargs):
     raise ActionInterrupted()
예제 #3
0
 def myhandler(sender, action, request, queryset, form, **kwargs):
     myhandler.invoked = True
     self.assertEqual(action, self.action_name)
     self.assertSequenceEqual(queryset.order_by('id').values_list('id', flat=True), self.selected_rows)
     self.assertTrue(isinstance(form, BaseForm))
     raise ActionInterrupted(self.MESSAGE)