incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [4/6] git commit: [#7051] Add test for paging of admin/tools
Date Tue, 18 Mar 2014 17:24:14 GMT
[#7051] Add test for paging of admin/tools

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1d66eb3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1d66eb3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1d66eb3a

Branch: refs/heads/tv/7051
Commit: 1d66eb3a84b19d9f75e035d81bf134ed13fea6c5
Parents: 35eee90
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Mar 18 16:14:43 2014 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Mar 18 16:31:08 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_admin.py | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1d66eb3a/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index 156fd66..49246a8 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -319,6 +319,14 @@ class TestProjectAdmin(TestController):
         # that we don't know about
         assert len(set(expected_tools) - set(tool_strings)) == 0, tool_strings
 
+    def test_tool_paging(self):
+        r = self.app.get('/admin/tools')
+        assert_equals(2, len(r.html.findAll('ul', {'class': 'deck'})))
+        r = self.app.get('/admin/tools?limit=1&page=0')
+        assert_equals(1, len(r.html.findAll('ul', {'class': 'deck'})))
+        r = self.app.get('/admin/tools?limit=1&page=1')
+        assert_equals(1, len(r.html.findAll('ul', {'class': 'deck'})))
+
     def test_tool_installation_limit(self):
         with mock.patch.object(ForgeWikiApp, 'max_instances') as mi:
             mi.__get__ = mock.Mock(return_value=1)


Mime
View raw message