'The admin shows default sort indicators for all kinds of \'ordering\'
fields: field names, method on the model admin and model itself, and
other callables. See #17252.'

def test_sort_indicators_admin_order(self):

    models = [(AdminOrderedField, 'adminorderedfield'), (AdminOrderedModelMethod, 'adminorderedmodelmethod'), (AdminOrderedAdminMethod, 'adminorderedadminmethod'), (AdminOrderedCallable, 'adminorderedcallable')]
    for (model, url) in models:
        model.objects.create(stuff='The    Last    Item', order=3)
        model.objects.create(stuff='The    First    Item', order=1)
        model.objects.create(stuff='The    Middle    Item', order=2)
        response = self.client.get(reverse(('admin:admin_views_%s_changelist' % url)), {})
        self.assertEqual(response.status_code, 200)
        self.assertContains(response, '<th    scope="col"', count=3, msg_prefix=url)
        self.assertEqual(response.context['cl'].get_ordering_field_columns(), {2: 'asc'})
        self.assertContentBefore(response, 'The    First    Item', 'The    Middle    Item')
        self.assertContentBefore(response, 'The    Middle    Item', 'The    Last    Item')
