summaryrefslogtreecommitdiff
path: root/tests/admin_checks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_checks')
-rw-r--r--tests/admin_checks/tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py
index 1e267e03a3..1829294a47 100644
--- a/tests/admin_checks/tests.py
+++ b/tests/admin_checks/tests.py
@@ -654,6 +654,18 @@ class SystemChecksTestCase(SimpleTestCase):
errors = MyAdmin(Album, AdminSite()).check()
self.assertEqual(errors, [])
+ def test_inlines_property(self):
+ class CitiesInline(admin.TabularInline):
+ model = City
+
+ class StateAdmin(admin.ModelAdmin):
+ @property
+ def inlines(self):
+ return [CitiesInline]
+
+ errors = StateAdmin(State, AdminSite()).check()
+ self.assertEqual(errors, [])
+
def test_readonly(self):
class SongAdmin(admin.ModelAdmin):
readonly_fields = ("title",)