-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into template-checklist
- Loading branch information
Showing
4 changed files
with
57 additions
and
10 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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
from pytest import fixture | ||
from typer.testing import CliRunner | ||
|
||
from data_safe_haven.administration.users.entra_users import EntraUsers | ||
from data_safe_haven.administration.users.research_user import ResearchUser | ||
from data_safe_haven.config import ( | ||
Context, | ||
ContextManager, | ||
|
@@ -260,3 +262,14 @@ def tmp_contexts_none(tmp_path, context_yaml): | |
with open(config_file_path, "w") as f: | ||
f.write(context_yaml) | ||
return tmp_path | ||
|
||
|
||
@fixture | ||
def mock_entra_user_list(mocker): | ||
test_user = ResearchUser( | ||
given_name="Harry", | ||
surname="Lime", | ||
sam_account_name="harry.lime", | ||
user_principal_name="[email protected]", | ||
) | ||
mocker.patch.object(EntraUsers, "list", return_value=[test_user]) |
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