'Ensures that 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 testSortIndicatorsAdminOrder(self):

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