incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [29/38] git commit: [#6366] Update reindex tests for new option
Date Fri, 21 Jun 2013 21:34:41 GMT
[#6366] Update reindex tests for new option

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/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/cj/6272
Commit: 1bae8fa55a8ed48e95a78a523bdf6c0e6807e6a1
Parents: 524d440
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Jun 18 18:29:13 2013 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@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))


Mime
View raw message