Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius committed Aug 30, 2024
1 parent 42f8028 commit 70e19d4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/base/tests/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 4 additions & 0 deletions addons/boa/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
6 changes: 6 additions & 0 deletions addons/gitlab/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
6 changes: 6 additions & 0 deletions addons/owncloud/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 70e19d4

Please sign in to comment.