allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [08/10] allura git commit: [#7794] ticket:686 Fix tests failing due to new default limit
Date Wed, 19 Nov 2014 22:59:47 GMT
[#7794] ticket:686 Fix tests failing due to new default limit


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

Branch: refs/heads/master
Commit: f66f754eeb30e5b881998bc02e1f9a47d77adb5b
Parents: 65b7d9f
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Nov 19 13:47:23 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Nov 19 22:58:33 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/model/test_discussion.py            | 4 ++--
 Allura/allura/tests/test_globals.py                     | 6 +++---
 ForgeTracker/forgetracker/tests/functional/test_root.py | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f66f754e/Allura/allura/tests/model/test_discussion.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_discussion.py b/Allura/allura/tests/model/test_discussion.py
index f814fad..1768777 100644
--- a/Allura/allura/tests/model/test_discussion.py
+++ b/Allura/allura/tests/model/test_discussion.py
@@ -365,7 +365,7 @@ def test_post_url_paginated():
 
     # with default paging limit
     for _p in p:
-        url = t.url() + '?limit=50#' + _p.slug
+        url = t.url() + '?limit=25#' + _p.slug
         assert _p.url_paginated() == url, _p.url_paginated()
 
     # with user paging limit
@@ -387,7 +387,7 @@ def test_post_url_paginated_with_artifact():
     page = Page.upsert(title='Test Page')
     thread = page.discussion_thread
     comment = thread.post('Comment')
-    url = page.url() + '?limit=50#' + comment.slug
+    url = page.url() + '?limit=25#' + comment.slug
     assert_equals(comment.url_paginated(), url)
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/f66f754e/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 85eeb37..dd4e7e6 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -748,9 +748,9 @@ class TestHandlePaging(unittest.TestCase):
         self.assertEqual(c.user.get_pref('results_per_page'), None)
 
     def test_without_limit(self):
-        # default limit = 50
-        self.assertEqual(g.handle_paging(None, 0), (50, 0, 0))
-        self.assertEqual(g.handle_paging(None, 2), (50, 2, 100))
+        # default limit = 25
+        self.assertEqual(g.handle_paging(None, 0), (25, 0, 0))
+        self.assertEqual(g.handle_paging(None, 2), (25, 2, 50))
         # handle paging must not mess up user preferences
         self.assertEqual(c.user.get_pref('results_per_page'), None)
 

http://git-wip-us.apache.org/repos/asf/allura/blob/f66f754e/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index b882680..8506d3a 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1444,7 +1444,7 @@ class TestFunctionalController(TrackerTestController):
                       headers={'Referer': '/bugs/1/'.encode("utf-8")})
         r = self.app.get('/bugs/feed.rss')
         post = M.Post.query.find().first()
-        assert '/p/test/bugs/1/?limit=50#' + post.slug in r
+        assert '/p/test/bugs/1/?limit=25#' + post.slug in r
         r = self.app.get('/bugs/1/')
         post_link = str(
             r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
@@ -2042,7 +2042,7 @@ class TestFunctionalController(TrackerTestController):
             'app_config_id': ac_id,
             'ticket_num': 1}).first()
         post = ticket.discussion_thread.last_post
-        ticket_link = '/p/test2/bugs2/1/?limit=50#' + post.slug
+        ticket_link = '/p/test2/bugs2/1/?limit=25#' + post.slug
         msg = 'Ticket moved from /p/test/bugs/1/'
         assert_equal(post.text, msg)
         # auto comment content and link to it should be in a ticket's feed
@@ -2075,7 +2075,7 @@ class TestFunctionalController(TrackerTestController):
         assert_equal(comments_cnt, 2)  # moved auto comment + new comment
         post = ticket.discussion_thread.last_post
         # content and link to the ticket should be in a tracker's feed
-        ticket_link = '/p/test2/bugs2/1/?limit=50#' + post.slug
+        ticket_link = '/p/test2/bugs2/1/?limit=25#' + post.slug
         r = self.app.get('/p/test2/bugs2/feed')
         assert post_content in r, r
         assert ticket_link in r, r


Mime
View raw message