'Tests a custom action defined in a ModelAdmin method'

def test_model_admin_custom_action(self):

    action_data = {ACTION_CHECKBOX_NAME: [1], 'action': 'mail_admin', 'index': 0}
    response = self.client.post('/test_admin/admin/admin_views/subscriber/', action_data)
    self.assertEquals(len(mail.outbox), 1)
    self.assertEquals(mail.outbox[0].subject, 'Greetings    from    a    ModelAdmin    action')
