diff --git a/swh/web/ui/tests/views/test_main.py b/swh/web/ui/tests/views/test_main.py index 0c81df3c3..ba809c6a4 100644 --- a/swh/web/ui/tests/views/test_main.py +++ b/swh/web/ui/tests/views/test_main.py @@ -1,30 +1,30 @@ # Copyright (C) 2016 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information from nose.tools import istest from .. import test_app class MainViewTestCase(test_app.SWHViewTestCase): render_template = False @istest def homepage(self): # when rv = self.client.get('/') # then self.assertEquals(rv.status_code, 302) - self.assertRedirects(rv, '/browse/') + self.assertRedirects(rv, '/api/') @istest def info(self): # when rv = self.client.get('/about/') self.assertEquals(rv.status_code, 200) self.assert_template_used('about.html') self.assertIn(b'About', rv.data) diff --git a/swh/web/ui/views/main.py b/swh/web/ui/views/main.py index 00dbc117a..9faea6b29 100644 --- a/swh/web/ui/views/main.py +++ b/swh/web/ui/views/main.py @@ -1,21 +1,21 @@ # Copyright (C) 2016 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information import flask from ..main import app @app.route('/') def homepage(): """Home page """ - return flask.redirect(flask.url_for('browse')) + return flask.redirect(flask.url_for('browse_api_doc')) @app.route('/about/') def about(): return flask.render_template('about.html')