diff --git a/bijoe/views.py b/bijoe/views.py index 3d4f732..6aaddcc 100644 --- a/bijoe/views.py +++ b/bijoe/views.py @@ -71,14 +71,6 @@ class HomepageView(AuthorizationMixin, ListView): def get_queryset(self): return self.model.all_visualizations() - def get(self, request, *args, **kwargs): - warehouses = get_warehouses() - if not len(self.get_queryset()) and len(warehouses) == 1: - engine = Engine(warehouses[0]) - return HttpResponseRedirect(reverse('warehouse', kwargs={'warehouse': engine.name}), - status=307) - return super(HomepageView, self).get(request, *args, **kwargs) - class MenuJSONView(AuthorizationMixin, View): def get(self, request, *args, **kwargs): diff --git a/tests/test_schema1.py b/tests/test_schema1.py index ffe7cda..aa75472 100644 --- a/tests/test_schema1.py +++ b/tests/test_schema1.py @@ -11,7 +11,8 @@ from bijoe.visualization.utils import Visualization def test_simple(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') assert 'big-msg-info' in response assert u'le champ « pouët »' in response @@ -41,7 +42,8 @@ def test_simple(schema1, app, admin): def test_truncated_previous_year_range(schema1, app, admin, freezer): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') @@ -66,7 +68,8 @@ def test_truncated_previous_year_range(schema1, app, admin, freezer): def test_boolean_dimension(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') @@ -81,7 +84,8 @@ def test_boolean_dimension(schema1, app, admin): def test_string_dimension(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') @@ -113,7 +117,8 @@ def test_string_dimension_json_data(schema1, app, admin): def test_item_dimension(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') @@ -135,7 +140,8 @@ def test_item_dimension(schema1, app, admin): def test_yearmonth_drilldown(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') @@ -151,7 +157,8 @@ def test_yearmonth_drilldown(schema1, app, admin): def test_ods(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') @@ -177,7 +184,8 @@ def test_ods(schema1, app, admin): def test_truncated_previous_year_range_on_datetime(schema1, app, admin, freezer): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table') diff --git a/tests/test_views.py b/tests/test_views.py index a7ade06..f073b3d 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -115,7 +115,8 @@ def test_missing_data(schema1, app, admin): def test_visualization_creation_view(schema1, app, admin): login(app, admin) - response = app.get('/').follow() + response = app.get('/') + response = response.click('schema1') response = response.click('Facts 1') form = response.form form.set('representation', 'table')