allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [11/20] git commit: [#7257] ticket:562 Fixed index tests
Date Wed, 21 May 2014 14:44:59 GMT
[#7257] ticket:562 Fixed index tests


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

Branch: refs/heads/master
Commit: 0c31e06c0bb320d72d502a9c8bc965f82615ef45
Parents: b072ab4
Author: Ferens Dmitriy <ferensdima@gmail.com>
Authored: Mon Apr 14 16:16:02 2014 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed May 21 14:44:21 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/session.py                    | 6 +++---
 ForgeBlog/forgeblog/tests/functional/test_root.py | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/0c31e06c/Allura/allura/model/session.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py
index 9cec981..0feb938 100644
--- a/Allura/allura/model/session.py
+++ b/Allura/allura/model/session.py
@@ -85,7 +85,6 @@ class IndexerSessionExtension(ManagedSessionExtension):
             except:
                 log.error('Error calling %s', task.__name__)
 
-
     def after_flush(self, obj=None):
         actions = [
             ((self.objects_added + self.objects_modified), 'add'),
@@ -95,8 +94,9 @@ class IndexerSessionExtension(ManagedSessionExtension):
             if obj_list:
                 types_objects_map = self._objects_by_types(obj_list)
                 for class_path, obj_list in types_objects_map.iteritems():
-                    tasks = self.TASKS.get(class_path, {})
-                    self._index_action(tasks, obj_list, action)
+                    tasks = self.TASKS.get(class_path)
+                    if tasks:
+                        self._index_action(tasks, obj_list, action)
 
         super(IndexerSessionExtension, self).after_flush(obj)
 

http://git-wip-us.apache.org/repos/asf/allura/blob/0c31e06c/ForgeBlog/forgeblog/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/functional/test_root.py b/ForgeBlog/forgeblog/tests/functional/test_root.py
index 63bbb8c..6bc530e 100644
--- a/ForgeBlog/forgeblog/tests/functional/test_root.py
+++ b/ForgeBlog/forgeblog/tests/functional/test_root.py
@@ -215,6 +215,7 @@ class Test(TestController):
 
     def test_related_artifacts(self):
         self._post(title='one')
+        M.MonQTask.run_ready()
         d = self._blog_date()
         self._post(title='two', text='[blog:%s/one]' % d)
         M.MonQTask.run_ready()


Mime
View raw message