Skip to content

Commit

Permalink
added test + typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunandadadi committed Mar 1, 2024
1 parent 540ee9c commit 384d1fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/users/externaloidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def verify_credentials(self, username_or_email, password):
"""
return (
None,
f"Unsupport login option. Please sign in with the configured {self._federated_service} provider",
f"Unsupported login option. Please sign in with the configured {self._federated_service} provider",
)

def check_group_lookup_args(self, group_lookup_args, disable_pagination=False):
Expand Down
8 changes: 8 additions & 0 deletions test/test_external_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,11 @@ def test_sync_user_groups_for_empty_user_obj(self):
self.oidc_instance.sync_user_groups(user_groups, user_obj, self.oidc_login_service)
user_teams_after_sync = TeamMember.select().where(TeamMember.user == user_obj).count()
assert user_teams_before_sync == user_teams_after_sync

def test_verify_credentials(self):
result, error_msg = self.oidc_instance.verify_credentials("username", "password")
assert result is None
assert (
error_msg
== "Unsupported login option. Please sign in with the configured oidc provider"
)

0 comments on commit 384d1fb

Please sign in to comment.