diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/admin_views/models.py | 9 | ||||
| -rw-r--r-- | tests/regressiontests/admin_views/tests.py | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py index b601267e57..58a545a64a 100644 --- a/tests/regressiontests/admin_views/models.py +++ b/tests/regressiontests/admin_views/models.py @@ -523,9 +523,12 @@ class LinkInline(admin.TabularInline): class Post(models.Model): - title = models.CharField(max_length=100) - content = models.TextField() - posted = models.DateField(default=datetime.date.today) + title = models.CharField(max_length=100, help_text="Some help text for the title (with unicode ŠĐĆŽćžšđ)") + content = models.TextField(help_text="Some help text for the content (with unicode ŠĐĆŽćžšđ)") + posted = models.DateField( + default=datetime.date.today, + help_text="Some help text for the date (with unicode ŠĐĆŽćžšđ)" + ) public = models.NullBooleanField() def awesomeness_level(self): diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py index 2685a05caa..f77c64bd21 100644 --- a/tests/regressiontests/admin_views/tests.py +++ b/tests/regressiontests/admin_views/tests.py @@ -2453,6 +2453,10 @@ class ReadonlyTest(TestCase): self.assertContains(response, '<div class="form-row posted">') self.assertContains(response, '<div class="form-row value">') self.assertContains(response, '<div class="form-row ">') + self.assertContains(response, '<p class="help">', 3) + self.assertContains(response, '<p class="help">Some help text for the title (with unicode ŠĐĆŽćžšđ)</p>') + self.assertContains(response, '<p class="help">Some help text for the content (with unicode ŠĐĆŽćžšđ)</p>') + self.assertContains(response, '<p class="help">Some help text for the date (with unicode ŠĐĆŽćžšđ)</p>') p = Post.objects.create(title="I worked on readonly_fields", content="Its good stuff") response = self.client.get('/test_admin/admin/admin_views/post/%d/' % p.pk) |
