Milimetric has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/80072


Change subject: moved the support page to the home controller
......................................................................

moved the support page to the home controller

Change-Id: I9cab2a500915f8ec6b5c67bde9628d64d293da35
---
M tests/test_controllers/test_demo.py
M tests/test_controllers/test_home.py
D tests/test_controllers/test_support.py
M wikimetrics/controllers/__init__.py
M wikimetrics/controllers/home.py
D wikimetrics/controllers/support.py
6 files changed, 21 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/72/80072/1

diff --git a/tests/test_controllers/test_demo.py 
b/tests/test_controllers/test_demo.py
index 6892032..dd0c024 100644
--- a/tests/test_controllers/test_demo.py
+++ b/tests/test_controllers/test_demo.py
@@ -20,7 +20,8 @@
         )
     
     def test_delete_cohorts(self):
-        users = self.session.query(CohortUser).filter(CohortUser.user_id == 
self.test_web_user_id)
+        users = self.session.query(CohortUser)\
+            .filter(CohortUser.user_id == self.test_web_user_id)
         print users.all()
         before = len(self.session.query(Cohort).all())
         assert_true(
diff --git a/tests/test_controllers/test_home.py 
b/tests/test_controllers/test_home.py
index add33bb..208faa1 100644
--- a/tests/test_controllers/test_home.py
+++ b/tests/test_controllers/test_home.py
@@ -1,4 +1,4 @@
-from nose.tools import assert_equal
+from nose.tools import assert_equal, assert_true
 from tests.fixtures import WebTest
 
 
@@ -15,3 +15,12 @@
     def test_favicon(self):
         response = self.app.get('/favicon.ico')
         assert_equal(response.status_code, 200)
+    
+    def test_support(self):
+        response = self.app.get('/support')
+        assert_equal(
+            response.status_code, 200,
+            '/ should get the support page'
+        )
+        
+        assert_true(response.data.find('Mailing list') >= 0)
diff --git a/tests/test_controllers/test_support.py 
b/tests/test_controllers/test_support.py
deleted file mode 100644
index 026fcec..0000000
--- a/tests/test_controllers/test_support.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from nose.tools import assert_equal, assert_true
-from tests.fixtures import WebTest
-
-
-class TestSupportController(WebTest):
-    
-    def test_index(self):
-        response = self.app.get('/', follow_redirects=True)
-        assert_equal(
-            response._status_code, 200,
-            '/ should get the support page'
-        )
-
-        assert_true(response.data.find('Mailing list') >= 0)
diff --git a/wikimetrics/controllers/__init__.py 
b/wikimetrics/controllers/__init__.py
index c77090d..9bdaf0c 100644
--- a/wikimetrics/controllers/__init__.py
+++ b/wikimetrics/controllers/__init__.py
@@ -12,7 +12,6 @@
 from authentication import *
 from metrics import *
 from cohorts import *
-from support import *
 from reports import *
 from demo import *
 
diff --git a/wikimetrics/controllers/home.py b/wikimetrics/controllers/home.py
index d9721e6..587316d 100644
--- a/wikimetrics/controllers/home.py
+++ b/wikimetrics/controllers/home.py
@@ -21,6 +21,15 @@
     return render_template('about.html')
 
 
[email protected]('/support')
+@is_public
+def support_index():
+    """
+    Renders a page with the details on how to get support for the Wikimetrics 
project.
+    """
+    return render_template('support.html')
+
+
 @app.route('/favicon.ico')
 @is_public
 def favicon():
diff --git a/wikimetrics/controllers/support.py 
b/wikimetrics/controllers/support.py
deleted file mode 100644
index 51fab83..0000000
--- a/wikimetrics/controllers/support.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import json
-import csv
-from flask import url_for, flash, render_template, redirect, request
-from ..configurables import app, db
-from authentication import is_public
-
-
[email protected]('/support/')
-@is_public
-def support_index():
-    """
-    Renders a page with the details on how to get support for the Wikimetrics 
project.
-    """
-    return render_template('support.html')

-- 
To view, visit https://gerrit.wikimedia.org/r/80072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cab2a500915f8ec6b5c67bde9628d64d293da35
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to