Skip to content

Commit f4ebd70

Browse files
committed
[1.2.X] Adjust AdminDocTests to run after r13728. Also match comments to tests and add test that was there in comment form only.Refs #3695.
Backport of r13737 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent f140436 commit f4ebd70

File tree

1 file changed

+11
-8
lines changed
  • tests/regressiontests/admin_views

1 file changed

+11
-8
lines changed

tests/regressiontests/admin_views/tests.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,16 +2206,19 @@ def test_tags(self):
22062206
self.assertContains(response, "<h2>Built-in tags</h2>", count=2)
22072207

22082208
# A builtin tag exists in both the index and detail
2209-
self.assertContains(response, '<h3 id="autoescape">autoescape</h3>')
2210-
self.assertContains(response, '<li><a href="#autoescape">autoescape</a></li>')
2209+
self.assertContains(response, '<h3 id="built_in-autoescape">autoescape</h3>')
2210+
self.assertContains(response, '<li><a href="#built_in-autoescape">autoescape</a></li>')
22112211

22122212
# An app tag exists in both the index and detail
2213-
# The builtin tag group exists
2213+
self.assertContains(response, '<h3 id="flatpages-get_flatpages">get_flatpages</h3>')
2214+
self.assertContains(response, '<li><a href="#flatpages-get_flatpages">get_flatpages</a></li>')
2215+
2216+
# The admin list tag group exists
22142217
self.assertContains(response, "<h2>admin_list</h2>", count=2)
22152218

2216-
# A builtin tag exists in both the index and detail
2217-
self.assertContains(response, '<h3 id="autoescape">autoescape</h3>')
2218-
self.assertContains(response, '<li><a href="#admin_actions">admin_actions</a></li>')
2219+
# An admin list tag exists in both the index and detail
2220+
self.assertContains(response, '<h3 id="admin_list-admin_actions">admin_actions</h3>')
2221+
self.assertContains(response, '<li><a href="#admin_list-admin_actions">admin_actions</a></li>')
22192222

22202223
def test_filters(self):
22212224
response = self.client.get('/test_admin/admin/doc/filters/')
@@ -2224,8 +2227,8 @@ def test_filters(self):
22242227
self.assertContains(response, "<h2>Built-in filters</h2>", count=2)
22252228

22262229
# A builtin filter exists in both the index and detail
2227-
self.assertContains(response, '<h3 id="add">add</h3>')
2228-
self.assertContains(response, '<li><a href="#add">add</a></li>')
2230+
self.assertContains(response, '<h3 id="built_in-add">add</h3>')
2231+
self.assertContains(response, '<li><a href="#built_in-add">add</a></li>')
22292232

22302233
except ImportError:
22312234
pass

0 commit comments

Comments
 (0)