summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc Aymerich <marcay@pangea.org>2012-12-06 09:47:51 +0100
committerClaude Paroz <claude@2xlibre.net>2012-12-06 09:54:47 +0100
commit57a41d985acabc7fc25f08081e58f0978cc8c1dc (patch)
tree438fb83a29c5e9135202f21316ffa71baf62526f /tests
parenta8045c3af2ad9da7332dadfc011bcaf50365dc7d (diff)
[1.5.x] Fixed #19429 -- Applied linebreaksbr to read-only fields in inlines
Applied to inlines what ec9d6b1122d did for main fieldsets. Backport of 553838a28 from master.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/admin_views/admin.py5
-rw-r--r--tests/regressiontests/admin_views/tests.py1
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/regressiontests/admin_views/admin.py b/tests/regressiontests/admin_views/admin.py
index d71c398376..1e4e9b5c75 100644
--- a/tests/regressiontests/admin_views/admin.py
+++ b/tests/regressiontests/admin_views/admin.py
@@ -346,7 +346,10 @@ class LinkInline(admin.TabularInline):
model = Link
extra = 1
- readonly_fields = ("posted",)
+ readonly_fields = ("posted", "multiline")
+
+ def multiline(self, instance):
+ return "InlineMultiline\ntest\nstring"
class SubPostInline(admin.TabularInline):
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
index d52ccafbd6..8579567438 100644
--- a/tests/regressiontests/admin_views/tests.py
+++ b/tests/regressiontests/admin_views/tests.py
@@ -3164,6 +3164,7 @@ class ReadonlyTest(TestCase):
# Checks that multiline text in a readonly field gets <br /> tags
self.assertContains(response, "Multiline<br />test<br />string")
+ self.assertContains(response, "InlineMultiline<br />test<br />string")
self.assertContains(response,
formats.localize(datetime.date.today() - datetime.timedelta(days=7))