incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [05/44] git commit: [#6534] ticket:415 remove get_wiki_url from github extractor
Date Fri, 04 Oct 2013 14:42:53 GMT
[#6534]  ticket:415 remove get_wiki_url from github extractor


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

Branch: refs/heads/master
Commit: 9472da3e4b19007a223b37c040f32037a4288e81
Parents: ea3a9b8
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Wed Sep 4 13:25:40 2013 +0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Oct 4 14:21:19 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/__init__.py             | 3 ---
 ForgeImporters/forgeimporters/github/tests/test_wiki.py      | 1 -
 ForgeImporters/forgeimporters/github/wiki.py                 | 2 +-
 ForgeImporters/forgeimporters/tests/github/test_extractor.py | 2 +-
 4 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9472da3e/ForgeImporters/forgeimporters/github/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/__init__.py b/ForgeImporters/forgeimporters/github/__init__.py
index cf843c2..2963067 100644
--- a/ForgeImporters/forgeimporters/github/__init__.py
+++ b/ForgeImporters/forgeimporters/github/__init__.py
@@ -95,6 +95,3 @@ class GitHubProjectExtractor(base.ProjectExtractor):
 
     def has_wiki(self):
         return self.get_page('project_info').get('has_wiki')
-
-    def get_wiki_url(self):
-        return self.get_page_url('wiki_url')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9472da3e/ForgeImporters/forgeimporters/github/tests/test_wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tests/test_wiki.py b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
index fe716e9..e9e31e8 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_wiki.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
@@ -36,7 +36,6 @@ class TestGitHubRepoImporter(TestCase):
     def test_import_tool_happy_path(self, ghpe, g):
         with patch('forgeimporters.github.wiki.GitHubWikiImporter.get_wiki_pages'), patch('forgeimporters.github.wiki.c'):
             ghpe.return_value.has_wiki.return_value = True
-            ghpe.return_value.get_wiki_url.return_value = "http://testwiki.com"
             p = self._make_project(gh_proj_name='myproject')
             GitHubWikiImporter().import_tool(p, Mock(name='c.user'), project_name='project_name',
user_name='testuser')
             p.install_app.assert_called_once_with(

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9472da3e/ForgeImporters/forgeimporters/github/wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/wiki.py b/ForgeImporters/forgeimporters/github/wiki.py
index 54a9870..2dc56ca 100644
--- a/ForgeImporters/forgeimporters/github/wiki.py
+++ b/ForgeImporters/forgeimporters/github/wiki.py
@@ -61,7 +61,7 @@ class GitHubWikiImporter(ToolImporter):
             mount_label=mount_label or 'Wiki')
 
         with h.push_config(c, app=app):
-            for page_name, page_text in self.get_wiki_pages(extractor.get_wiki_url()).iteritems():
+            for page_name, page_text in self.get_wiki_pages(extractor.get_page_url('wiki_url')).iteritems():
                 page = WM.Page.upsert(page_name)
                 page.text = page_text
                 page.viewable_by = ['all']

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9472da3e/ForgeImporters/forgeimporters/tests/github/test_extractor.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/github/test_extractor.py b/ForgeImporters/forgeimporters/tests/github/test_extractor.py
index 0193002..11601a5 100644
--- a/ForgeImporters/forgeimporters/tests/github/test_extractor.py
+++ b/ForgeImporters/forgeimporters/tests/github/test_extractor.py
@@ -125,4 +125,4 @@ class TestGitHubProjectExtractor(TestCase):
         assert self.extractor.has_wiki()
 
     def test_get_wiki_url(self):
-        self.assertEqual(self.extractor.get_wiki_url(), 'https://github.com/test_project.wiki')
+        self.assertEqual(self.extractor.get_page_url('wiki_url'), 'https://github.com/test_project.wiki')


Mime
View raw message