datatracker/ietf/help/tests_views.py
Henrik Levkowetz 1b3e98dd31 Added simple tests for help and release pages.
- Legacy-Id: 9413
2015-04-05 20:59:51 +00:00

24 lines
710 B
Python

from pyquery import PyQuery
from django.core.urlresolvers import reverse
import debug # pyflakes:ignore
from ietf.utils.test_utils import TestCase
from ietf.doc.models import StateType
class StateHelpTest(TestCase):
def test_state_index(self):
url = reverse('ietf.help.views.state_index')
r = self.client.get(url)
q = PyQuery(r.content)
content = [ e.text for e in q('#content table td a ') ]
names = StateType.objects.values_list('slug', flat=True)
# The following doesn't cover all doc types, only a selection
for name in names:
if not '-' in name:
self.assertIn(name, content)