allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [29/38] git commit: [#4019] ticket:560 Fixed tests for 'paged_search' & 'paged_query_or_search'
Date Wed, 30 Apr 2014 18:16:01 GMT
[#4019] ticket:560 Fixed tests for 'paged_search' & 'paged_query_or_search'


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

Branch: refs/heads/master
Commit: edba7346e6fd59f6d2497a521fa51887d2932a8c
Parents: 4ab00ff
Author: Ferens Dmitriy <ferensdima@gmail.com>
Authored: Tue Mar 25 13:11:55 2014 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Apr 30 15:55:14 2014 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/tests/functional/test_root.py   | 3 ++-
 ForgeTracker/forgetracker/tests/unit/test_ticket_model.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/edba7346/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 96196fe..f3b4667 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2329,7 +2329,8 @@ class TestFunctionalController(TrackerTestController):
         query_filter_choices.return_value = {'status': [('open', 2)], }
         r = self.app.get('/bugs/')
         assert '<option value="open">open (2)</label>' in r
-        query_filter_choices.assert_called_once_with('!status_s:wont-fix && !status_s:closed')
+        assert query_filter_choices.call_count == 1
+        assert query_filter_choices.call_args[0][0] == '!status_s:wont-fix && !status_s:closed'
 
 class TestMilestoneAdmin(TrackerTestController):
 

http://git-wip-us.apache.org/repos/asf/allura/blob/edba7346/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py b/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
index 810cff4..aa17c1f 100644
--- a/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
+++ b/ForgeTracker/forgetracker/tests/unit/test_ticket_model.py
@@ -323,7 +323,8 @@ class TestTicketModel(TrackerTestWithModel):
         filter = None
         Ticket.paged_query_or_search(app_cfg, user, mongo_query, solr_query, filter, **kw)
         query.assert_called_once_with(app_cfg, user, mongo_query, sort=None, limit=None,
page=0, **kw)
-        tsearch.query_filter_choices.assert_called_once_with('solr query')
+        assert_equal(tsearch.query_filter_choices.call_count, 1)
+        assert_equal(tsearch.query_filter_choices.call_args[0][0], 'solr query')
         assert_equal(search.call_count, 0)
         query.reset_mock(), search.reset_mock(), tsearch.reset_mock()
 


Mime
View raw message