Docs: add a test that there are sidebar links

This commit is contained in:
Aleksey Zhukov 2017-05-23 20:02:33 +03:00
parent 699a5eec68
commit da2fb5a7f6
No known key found for this signature in database
GPG Key ID: E1C3A2857EFC7C66

View File

@ -53,3 +53,7 @@ class TestRecursiveUrlViewSets(TestCase):
'$ coreapi action {} retrieve_alt {}'.format(' '.join(route), method) in self.content,
'unable to find shell code snippet for {}'.format(subpath)
)
self.assertTrue(
re.search('<li><a href="#{}"[^>]*>\s*{}'.format(subpath, method), self.content),
'unable to find sidebar link for {}'.format(subpath)
)