You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/01/08 23:42:23 UTC
allura git commit: [#7919] fix tests that broke in b6f25a4 since they
were inadvertently relying on TestRestApiBase running before them and calling
setup_global_objects()
Repository: allura
Updated Branches:
refs/heads/master 1517fcfaa -> 3424beedf
[#7919] fix tests that broke in b6f25a4 since they were inadvertently relying on TestRestApiBase running before them and calling setup_global_objects()
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/3424beed
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3424beed
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3424beed
Branch: refs/heads/master
Commit: 3424beedfdbefa0250b682581d554aba2db05a35
Parents: 1517fcf
Author: Dave Brondsema <da...@brondsema.net>
Authored: Fri Jan 8 17:41:52 2016 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Jan 8 17:42:17 2016 -0500
----------------------------------------------------------------------
ForgeTracker/forgetracker/tests/unit/__init__.py | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/3424beed/ForgeTracker/forgetracker/tests/unit/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/unit/__init__.py b/ForgeTracker/forgetracker/tests/unit/__init__.py
index 0a2189a..ee9af84 100644
--- a/ForgeTracker/forgetracker/tests/unit/__init__.py
+++ b/ForgeTracker/forgetracker/tests/unit/__init__.py
@@ -16,9 +16,12 @@
# under the License.
from pylons import tmpl_context as c
+from pylons import request
from ming.orm.ormsession import ThreadLocalORMSession
+from webob import Request
from allura.websetup import bootstrap
+from allura.websetup.schema import REGISTRY
from allura.lib import helpers as h
from allura.lib import plugin
from allura import model as M
@@ -45,6 +48,7 @@ class TrackerTestWithModel(object):
c.project.install_app('Tickets', 'bugs')
ThreadLocalORMSession.flush_all()
h.set_context('test', 'bugs', neighborhood='Projects')
+ REGISTRY.register(request, Request.blank('/')) # borrowed from setup_unit_test but we need just this
def tearDown(self):
ThreadLocalORMSession.close_all()