This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Julien Rossow-Greenberg
committed
Feb 23, 2024
1 parent
e9f106d
commit 0f8c132
Showing
2 changed files
with
22 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -537,7 +537,7 @@ def search_kb_articles( | |
return [KnowledgeArticle(**item) for item in response] | ||
|
||
# | ||
# PERSON | ||
# People | ||
# | ||
|
||
def get_person( | ||
|
@@ -551,3 +551,15 @@ def get_person( | |
|
||
response = self.__request("GET", url=url) | ||
return Person(**response) | ||
|
||
def search_people(self, search_payload: dict) -> List[Person]: | ||
""" | ||
Search People | ||
{ | ||
"UserName": "[email protected]", | ||
} | ||
""" | ||
url = f"{self.people_url}/search" | ||
|
||
response = self.__request("POST", url=url, data=search_payload) | ||
return [Person(**item) for item in response] |
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 |
---|---|---|
|
@@ -117,6 +117,15 @@ def test_get_person(tdx_client): | |
assert isinstance(result, Person) | ||
|
||
|
||
def test_search_people(tdx_client): | ||
result = tdx_client.search_people( | ||
search_payload={ | ||
"UserName": "[email protected]", | ||
} | ||
) | ||
assert result[0].UID == "eb449a7d-df73-ee11-826a-0050f2f4736d" | ||
|
||
|
||
### Admin tests | ||
|
||
""" | ||
|