mirror of
https://github.com/open-webui/open-webui
synced 2025-06-22 18:07:17 +00:00
update tests for adjusted query string & payload
This commit is contained in:
parent
30f4950c5c
commit
04811dd15d
@ -19,14 +19,14 @@ class TestOAuthGoogleGroups:
|
||||
mock_response_data = {
|
||||
"memberships": [
|
||||
{
|
||||
"group": {
|
||||
"groupKey": {"id": "admin@company.com"}
|
||||
}
|
||||
"groupKey": {"id": "admin@company.com"},
|
||||
"group": "groups/123",
|
||||
"displayName": "Admin Group"
|
||||
},
|
||||
{
|
||||
"group": {
|
||||
"groupKey": {"id": "users@company.com"}
|
||||
}
|
||||
"groupKey": {"id": "users@company.com"},
|
||||
"group": "groups/456",
|
||||
"displayName": "Users Group"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -63,9 +63,9 @@ class TestOAuthGoogleGroups:
|
||||
mock_session.get.assert_called_once()
|
||||
call_args = mock_session.get.call_args
|
||||
|
||||
# Check the URL contains the user email
|
||||
# Check the URL contains the user email (URL encoded)
|
||||
url_arg = call_args[0][0] # First positional argument
|
||||
assert "user@company.com" in url_arg
|
||||
assert "user%40company.com" in url_arg # @ is encoded as %40
|
||||
assert "searchTransitiveGroups" in url_arg
|
||||
|
||||
# Check headers contain the bearer token
|
||||
|
@ -577,8 +577,6 @@ class OAuthManager:
|
||||
log.debug(f"Updated profile picture for user {user.email}")
|
||||
|
||||
if not user:
|
||||
user_count = Users.get_num_users()
|
||||
|
||||
# If the user does not exist, check if signups are enabled
|
||||
if auth_manager_config.ENABLE_OAUTH_SIGNUP:
|
||||
# Check if an existing user with the same email already exists
|
||||
|
Loading…
Reference in New Issue
Block a user