Refs #7497 -- Added assertion for the default order of models in AdminSite.app_index().

This commit is contained in:
Mariusz Felisiak 2022-03-24 12:13:18 +01:00
parent 1d9d082acf
commit d44951b36e
1 changed files with 3 additions and 0 deletions

View File

@ -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(