Skip to content

Commit

Permalink
Adjust AdminDocTests to run after r13728. Also match comments to test…
Browse files Browse the repository at this point in the history
…s and add test that was there in comment form only.Refs #3695.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
kmtracey committed Sep 11, 2010
1 parent 568b9cd commit 506d559
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tests/regressiontests/admin_views/tests.py
Expand Up @@ -2228,16 +2228,19 @@ def test_tags(self):
self.assertContains(response, "<h2>Built-in tags</h2>", count=2) self.assertContains(response, "<h2>Built-in tags</h2>", count=2)


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


# An app tag exists in both the index and detail # An app tag exists in both the index and detail
# The builtin tag group exists self.assertContains(response, '<h3 id="flatpages-get_flatpages">get_flatpages</h3>')
self.assertContains(response, '<li><a href="#flatpages-get_flatpages">get_flatpages</a></li>')

# The admin list tag group exists
self.assertContains(response, "<h2>admin_list</h2>", count=2) self.assertContains(response, "<h2>admin_list</h2>", count=2)


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


def test_filters(self): def test_filters(self):
response = self.client.get('/test_admin/admin/doc/filters/') response = self.client.get('/test_admin/admin/doc/filters/')
Expand All @@ -2246,8 +2249,8 @@ def test_filters(self):
self.assertContains(response, "<h2>Built-in filters</h2>", count=2) self.assertContains(response, "<h2>Built-in filters</h2>", count=2)


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


except ImportError: except ImportError:
pass pass

0 comments on commit 506d559

Please sign in to comment.