--- a/Allura/allura/tests/functional/test_home.py
+++ b/Allura/allura/tests/functional/test_home.py
@@ -12,45 +12,16 @@
def test_project_nav(self):
response = self.app.get('/p/test/_nav.json')
- root = self.app.get('/p/test/home/')
+ root = self.app.get('/p/test/home/').follow()
nav_links = root.html.find('div', dict(id='top_nav')).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']
- def test_home(self):
- r0 = self.app.get('/home/').body
- r = self.app.get('/home/configuration')
- selects = r.html.findAll('select')
- options = selects[-1].findAll('option')
- wnames = [
- o['value'] for o in options ]
- params = variable_encode(dict(
- divs=[
- dict(name='content',
- content=[ dict(widget=wn) for wn in wnames ])
- ]))
- self.app.post('/home/update_configuration', params=params)
- r1 = self.app.get('/home/').body
- assert r0 != r1
-
def test_neighborhood_home(self):
- r0 = self.app.get('/p/test/home/').body
- r1 = self.app.get('/adobe/test/home/', status=302)
- r2 = self.app.get('/adobe/no_such_project/home/', status=404)
- r = self.app.get('/p/test/home/configuration')
- selects = r.html.findAll('select')
- options = selects[-1].findAll('option')
- wnames = [
- o['value'] for o in options ]
- params = variable_encode(dict(
- divs=[
- dict(name='content',
- content=[ dict(widget=wn) for wn in wnames ])
- ]))
- self.app.post('/p/test/home/update_configuration', params=params)
- r1 = self.app.get('/home/').body
- assert r0 != r1
+ self.app.get('/p/test/home/', status=302)
+ self.app.get('/adobe/test/home/', status=302)
+ self.app.get('/adobe/no_such_project/home/', status=404)
def test_user_subproject_home_not_profile(self):
u_proj = M.Project.query.get(shortname='u/test-admin')