Parent: [439308] (diff)

Child: [8fe936] (diff)

Download this file

test_root.py    14 lines (10 with data), 474 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import pprint
from forgelink.tests import TestController
class TestRootController(TestController):
def test_root(self):
response = self.app.get('/downloads/nav.json')
root = self.app.get('/p/test/home/')
nav_links = root.html.find('div', dict(id='nav_menu')).findAll('a')
assert len(nav_links) == len(response.json['menu'])
for nl, entry in zip(nav_links, response.json['menu']):
assert nl['href'] == entry['url']