Refs -- Added assertion for the default order of models in AdminSite.app_index().
@@ -1354,6 +1354,9 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
)
self.assertEqual(response.context["title"], "Admin_Views administration")
self.assertEqual(response.context["app_label"], "admin_views")
+ # Models are sorted alphabetically by default.
+ models = [model["name"] for model in response.context["app_list"][0]["models"]]
+ self.assertSequenceEqual(models, sorted(models))
def test_change_view_subtitle_per_object(self):
response = self.client.get(
