You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/09/26 14:10:52 UTC

[allura] branch dw/8455-part2 updated: fixup! fixup! [#8455] converted the remaining modules fully to pytest

This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch dw/8455-part2
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/dw/8455-part2 by this push:
     new 5a3c76630 fixup! fixup! [#8455] converted the remaining modules fully to pytest
5a3c76630 is described below

commit 5a3c766302f5b17783ba7d8d19bfcac3112f4e0f
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Mon Sep 26 14:10:41 2022 +0000

    fixup! fixup! [#8455] converted the remaining modules fully to pytest
---
 ForgeImporters/forgeimporters/github/__init__.py         | 3 +++
 ForgeImporters/forgeimporters/github/tests/test_oauth.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ForgeImporters/forgeimporters/github/__init__.py b/ForgeImporters/forgeimporters/github/__init__.py
index 34dab0a3f..968eb2b89 100644
--- a/ForgeImporters/forgeimporters/github/__init__.py
+++ b/ForgeImporters/forgeimporters/github/__init__.py
@@ -250,6 +250,9 @@ class GitHubOAuthMixin:
     @without_trailing_slash
     @expose()
     def oauth_callback(self, **kw):
+        self.handle_oauth_callback()
+
+    def handle_oauth_callback(self):
         client_id = config.get('github_importer.client_id')
         secret = config.get('github_importer.client_secret')
         if not client_id or not secret:
diff --git a/ForgeImporters/forgeimporters/github/tests/test_oauth.py b/ForgeImporters/forgeimporters/github/tests/test_oauth.py
index c8bbadf99..8b60d03df 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_oauth.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_oauth.py
@@ -77,6 +77,6 @@ class TestGitHubOAuthMixin(TestController, TestCase):
     def test_oauth_callback_complete(self):
         with patch.object(self.mix, 'oauth_callback_complete') as _mock, \
                 patch('forgeimporters.github.redirect') as tg_redir:
-            self.mix.oauth_callback()
+            self.mix.handle_oauth_callback()
         self.assertEqual(_mock.call_count, 1)
         self.assertEqual(tg_redir.call_count, 1)