incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [04/10] git commit: [#7111] Fixed failing test and added comment
Date Thu, 06 Feb 2014 02:40:00 GMT
[#7111] Fixed failing test and added comment

Signed-off-by: Cory Johns <cjohns@slashdotmedia.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/80ba5547
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/80ba5547
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/80ba5547

Branch: refs/heads/tv/7042
Commit: 80ba554700af5e1c7a3ba631e6572dd6ea5aaef4
Parents: 2707fc3
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Feb 5 20:10:51 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Feb 5 21:24:08 2014 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/base.py                   | 2 ++
 ForgeImporters/forgeimporters/github/tests/test_code.py | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/80ba5547/ForgeImporters/forgeimporters/base.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/base.py b/ForgeImporters/forgeimporters/base.py
index d1fbd38..4353fd2 100644
--- a/ForgeImporters/forgeimporters/base.py
+++ b/ForgeImporters/forgeimporters/base.py
@@ -581,6 +581,8 @@ class ProjectToolsImportController(object):
         hidden = set(aslist(config.get('hidden_importers'), sep=','))
         visible = lambda ep: ep.name not in hidden
         for ep in filter(visible, h.iter_entry_points('allura.importers')):
+            # must instantiate to ensure importer.target_app is populated
+            # (see ToolImporterMeta.__call__)
             importer = ep.load()()
             for tool in aslist(importer.target_app):
                 tools_with_importers.add(tool.tool_label)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/80ba5547/ForgeImporters/forgeimporters/github/tests/test_code.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tests/test_code.py b/ForgeImporters/forgeimporters/github/tests/test_code.py
index bb8ed25..e247a5f 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_code.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_code.py
@@ -22,6 +22,7 @@ from ming.odm import ThreadLocalORMSession
 from allura.tests import TestController
 from allura.tests.decorators import with_tool
 from allura import model as M
+from alluratest.controller import setup_unit_test
 from forgeimporters.github.code import GitHubRepoImporter
 from forgeimporters.github import GitHubOAuthMixin
 
@@ -43,6 +44,7 @@ class TestGitHubRepoImporter(TestCase):
     @patch('forgeimporters.github.code.g')
     @patch('forgeimporters.github.code.GitHubProjectExtractor')
     def test_import_tool_happy_path(self, ghpe, g, M):
+        setup_unit_test()
         ghpe.return_value.get_repo_url.return_value = 'http://remote/clone/url/'
         p = self._make_project(gh_proj_name='myproject')
         u = Mock(name='c.user')


Mime
View raw message