-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96723da
commit e7c3bde
Showing
2 changed files
with
34 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import logging | ||
import re | ||
from unittest import mock | ||
from unittest.mock import AsyncMock | ||
|
||
from pytest import fixture, mark, raises | ||
from traitlets.config import Config | ||
|
@@ -211,7 +212,7 @@ async def test_google( | |
handled_user_model = user_model("[email protected]", "user1") | ||
handler = google_client.handler_for_user(handled_user_model) | ||
with mock.patch.object( | ||
authenticator, "_fetch_member_groups", lambda *args: {"group1"} | ||
authenticator, "_fetch_member_groups", AsyncMock(return_value={"group1"}) | ||
): | ||
auth_model = await authenticator.get_authenticated_user(handler, None) | ||
|
||
|