allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [10/18] git commit: [#7257] ticket:562 Fixed tests
Date Fri, 09 May 2014 21:42:30 GMT
[#7257] ticket:562 Fixed tests


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

Branch: refs/heads/db/7257
Commit: baf6601c7d518d93be8c586b95b55d57f1c9f636
Parents: d06823f
Author: Ferens Dmitriy <ferensdima@gmail.com>
Authored: Thu Apr 3 17:28:43 2014 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri May 9 18:56:47 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/test_tasks.py     | 3 ++-
 Allura/allura/tests/unit/test_solr.py | 6 ------
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/baf6601c/Allura/allura/tests/test_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_tasks.py b/Allura/allura/tests/test_tasks.py
index 4e56590..97c7699 100644
--- a/Allura/allura/tests/test_tasks.py
+++ b/Allura/allura/tests/test_tasks.py
@@ -104,8 +104,9 @@ class TestIndexTasks(unittest.TestCase):
     def test_add_projects(self):
         g.solr.db.clear()
         old_solr_size = len(g.solr.db)
-        projects = M.Project.query.find().all()
+        projects = M.Project.query.find().all()        
         index_tasks.add_projects.post([p._id for p in projects])
+        M.MonQTask.run_ready()
         new_solr_size = len(g.solr.db)
         assert old_solr_size + len(projects) == new_solr_size
 

http://git-wip-us.apache.org/repos/asf/allura/blob/baf6601c/Allura/allura/tests/unit/test_solr.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/test_solr.py b/Allura/allura/tests/unit/test_solr.py
index eb98637..aca6969 100644
--- a/Allura/allura/tests/unit/test_solr.py
+++ b/Allura/allura/tests/unit/test_solr.py
@@ -115,12 +115,6 @@ class TestSearchIndexable(unittest.TestCase):
         self.obj.index = lambda: dict(text='&lt;script&gt;a(1)&lt;/script&gt;')
         assert_equal(self.obj.solarize(), dict(text='<script>a(1)</script>'))
 
-    def test_add_to_solr(self):
-        solr_obj = mock.MagicMock()
-        self.obj.index = lambda: dict(text='test')
-        self.obj.add_to_solr(solr_obj)
-        solr_obj.add.assert_called_once_with(dict(text='test'))
-
 
 class TestSearch_app(unittest.TestCase):
 


Mime
View raw message