diff options
author | Nick Sandford <nick@sandford.id.au> | 2014-07-25 13:07:04 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2014-07-31 08:07:28 -0400 |
commit | 9d9f0acd7e245c9f9c30727a003666618754c924 (patch) | |
tree | 719c97995bfa06038e3e72efbb0c106f3e73861d /tests/admin_ordering | |
parent | 9a922dcad1e50afc91329009e8689e5c08c2a1bf (diff) | |
download | django-9d9f0acd7e245c9f9c30727a003666618754c924.tar.gz |
Fixed #13163 -- Added ability to show change links on inline objects in admin.
Thanks DrMeers for the suggestion.
Diffstat (limited to 'tests/admin_ordering')
-rw-r--r-- | tests/admin_ordering/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/admin_ordering/tests.py b/tests/admin_ordering/tests.py index bc08adee12..1bd06e6e5a 100644 --- a/tests/admin_ordering/tests.py +++ b/tests/admin_ordering/tests.py @@ -44,7 +44,7 @@ class TestAdminOrdering(TestCase): The default ordering should be by name, as specified in the inner Meta class. """ - ma = ModelAdmin(Band, None) + ma = ModelAdmin(Band, admin.site) names = [b.name for b in ma.get_queryset(request)] self.assertListEqual(['Aerosmith', 'Radiohead', 'Van Halen'], names) @@ -55,7 +55,7 @@ class TestAdminOrdering(TestCase): """ class BandAdmin(ModelAdmin): ordering = ('rank',) # default ordering is ('name',) - ma = BandAdmin(Band, None) + ma = BandAdmin(Band, admin.site) names = [b.name for b in ma.get_queryset(request)] self.assertListEqual(['Radiohead', 'Van Halen', 'Aerosmith'], names) @@ -67,7 +67,7 @@ class TestAdminOrdering(TestCase): other_user = User.objects.create(username='other') request = self.request_factory.get('/') request.user = super_user - ma = DynOrderingBandAdmin(Band, None) + ma = DynOrderingBandAdmin(Band, admin.site) names = [b.name for b in ma.get_queryset(request)] self.assertListEqual(['Radiohead', 'Van Halen', 'Aerosmith'], names) request.user = other_user @@ -94,7 +94,7 @@ class TestInlineModelAdminOrdering(TestCase): The default ordering should be by name, as specified in the inner Meta class. """ - inline = SongInlineDefaultOrdering(self.band, None) + inline = SongInlineDefaultOrdering(self.band, admin.site) names = [s.name for s in inline.get_queryset(request)] self.assertListEqual(['Dude (Looks Like a Lady)', 'Jaded', 'Pink'], names) @@ -102,7 +102,7 @@ class TestInlineModelAdminOrdering(TestCase): """ Let's check with ordering set to something different than the default. """ - inline = SongInlineNewOrdering(self.band, None) + inline = SongInlineNewOrdering(self.band, admin.site) names = [s.name for s in inline.get_queryset(request)] self.assertListEqual(['Jaded', 'Pink', 'Dude (Looks Like a Lady)'], names) |