diff --git a/addons/base/tests/views.py b/addons/base/tests/views.py index 33675736754..f543f462ebc 100644 --- a/addons/base/tests/views.py +++ b/addons/base/tests/views.py @@ -78,7 +78,10 @@ def test_oauth_finish_enable_gv(self, mock_requests_get): gv_callback_url = mock_requests_get.call_args[0][0] parsed_callback_url = urlparse(gv_callback_url) assert parsed_callback_url.netloc == urlparse(GRAVYVALET_URL).netloc - assert parsed_callback_url.path == '/v1/oauth/callback' + if self.Provider._oauth_version == 1: + assert parsed_callback_url.path == '/v1/oauth1/callback' + elif self.Provider._oauth_version == 2: + assert parsed_callback_url.path == '/v1/oauth2/callback' assert dict(parse_qsl(parsed_callback_url.query)) == query_params def test_delete_external_account(self): diff --git a/addons/boa/tests/test_views.py b/addons/boa/tests/test_views.py index 3989386f739..e71e81e6dce 100644 --- a/addons/boa/tests/test_views.py +++ b/addons/boa/tests/test_views.py @@ -25,6 +25,10 @@ def test_oauth_finish(self): """Not applicable to non-oauth add-ons.""" pass + def test_oauth_finish_enable_gv(self): + """Not applicable to non-oauth add-ons""" + pass + class TestConfigViews(BoaBasicAuthAddonTestCase, OAuthAddonConfigViewsTestCaseMixin, OsfTestCase): diff --git a/addons/gitlab/tests/test_views.py b/addons/gitlab/tests/test_views.py index da3b87a0b9c..312e777bcce 100644 --- a/addons/gitlab/tests/test_views.py +++ b/addons/gitlab/tests/test_views.py @@ -37,9 +37,15 @@ def test_delete_external_account(self): super().test_delete_external_account() def test_oauth_start(self): + """Not applicable for non-oauth addons""" pass def test_oauth_finish(self): + """Not applicable for non-oauth addons""" + pass + + def test_oauth_finish_enable_gv(self): + """Not applicable for non-oauth addons""" pass diff --git a/addons/owncloud/tests/test_views.py b/addons/owncloud/tests/test_views.py index 8aa7c4b6430..2182c26fd61 100644 --- a/addons/owncloud/tests/test_views.py +++ b/addons/owncloud/tests/test_views.py @@ -12,9 +12,15 @@ class TestAuthViews(OwnCloudBasicAuthAddonTestCase, OAuthAddonAuthViewsTestCaseMixin, OsfTestCase): def test_oauth_start(self): + """Not applicable for non-oauth addons""" pass def test_oauth_finish(self): + """Not applicable for non-oauth addons""" + pass + + def test_oauth_finish_enable_gv(self): + """Not applicable for non-oauth addons""" pass