You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/06/18 20:29:37 UTC

git commit: [#6366] Update reindex tests for new option

Updated Branches:
  refs/heads/master 524d440cd -> 1bae8fa55


[#6366] Update reindex tests for new option

Signed-off-by: Tim Van Steenburgh <tv...@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/1bae8fa5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1bae8fa5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1bae8fa5

Branch: refs/heads/master
Commit: 1bae8fa55a8ed48e95a78a523bdf6c0e6807e6a1
Parents: 524d440
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Jun 18 18:29:13 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Jun 18 18:29:13 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tests/test_commands.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1bae8fa5/Allura/allura/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_commands.py b/Allura/allura/tests/test_commands.py
index 5545466..0cecfbf 100644
--- a/Allura/allura/tests/test_commands.py
+++ b/Allura/allura/tests/test_commands.py
@@ -391,7 +391,7 @@ class TestReindexCommand(object):
     @patch('allura.command.show_models.add_artifacts')
     def test_chunked_add_artifacts(self, add_artifacts):
         cmd = show_models.ReindexCommand('reindex')
-        cmd.options = Mock(tasks=True, max_chunk=10*1000)
+        cmd.options = Mock(tasks=True, max_chunk=10*1000, ming_config=None)
         ref_ids = list(range(10 * 1000 * 2 + 20))
         cmd._chunked_add_artifacts(ref_ids)
         assert_equal(len(add_artifacts.post.call_args_list), 3)
@@ -429,6 +429,6 @@ class TestReindexCommand(object):
             raise pymongo.errors.InvalidDocument("Cannot encode object...")
         add_artifacts.post.side_effect = on_post
         cmd = show_models.ReindexCommand('reindex')
-        cmd.options = Mock()
+        cmd.options = Mock(ming_config=None)
         with td.raises(pymongo.errors.InvalidDocument):
             cmd._post_add_artifacts(range(5))