-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Update create profile method (#2448)
* Feat: Update create profile method * Feat: Update test to use API V2 --------- Co-authored-by: celestemartinez <[email protected]>
- Loading branch information
1 parent
d5d540f
commit 121fe2c
Showing
3 changed files
with
77 additions
and
93 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 |
---|---|---|
|
@@ -263,33 +263,33 @@ def test_get_preferred_name(self, client, test_client): | |
assert preferred_name, "preferred name not found" | ||
assert preferred_name == 'SomeFirstName User' | ||
|
||
def test_create_authorid_profiles(self, client): | ||
def test_create_authorid_profiles(self, openreview_client): | ||
authors = [ | ||
'Ada Lovelace', | ||
'Alan Turing', | ||
'Edsger W. Dijkstra', | ||
'Grace Hopper' | ||
'Grace Hopper', | ||
] | ||
|
||
authorids = [ | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]' | ||
'[email protected]', | ||
] | ||
|
||
note = openreview.Note.from_json({ | ||
note = openreview.api.Note.from_json({ | ||
'id': 'MOCK_NOTE', | ||
'content': { | ||
'authors': authors, | ||
'authorids': authorids | ||
'authors': {'value': authors}, | ||
'authorids': {'value': authorids}, | ||
} | ||
}) | ||
|
||
openreview.tools.create_authorid_profiles(client, note) | ||
openreview.tools.create_authorid_profiles(openreview_client, note) | ||
|
||
for author, email in zip(authors, authorids): | ||
result = client.search_profiles(term=author) | ||
result = openreview_client.search_profiles(term=author) | ||
assert any([email in p.content['emails'] for p in result]) | ||
|
||
def test_subdomains(self): | ||
|