-
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.
fix contact_email validation (#2382)
- Loading branch information
1 parent
8b837b1
commit 03d796c
Showing
2 changed files
with
10 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1280,7 +1280,7 @@ def setup_request_form(self): | |
}, | ||
'contact_email': { | ||
'description': 'Single point of contact email address which will be displayed on the venue page. For example: [email protected]', | ||
'value-regex': r'([a-z0-9_\-\.]{2,}@[a-z0-9_\-\.]{2,}\.[a-z]{2,},){0,}([a-z0-9_\-\.]{2,}@[a-z0-9_\-\.]{2,}\.[a-z]{2,})', | ||
'value-regex': r'[a-z0-9_\-\.]{2,}@[a-z0-9_\-\.]{2,}\.[a-z]{2,}', | ||
'required': True, | ||
'order': 6 | ||
}, | ||
|
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 |
---|---|---|
|
@@ -178,7 +178,7 @@ def test_venue_deployment(self, client, selenium, request_page, helpers, openrev | |
due_date = now + datetime.timedelta(minutes=30) | ||
withdraw_exp_date = now + datetime.timedelta(hours=1) | ||
|
||
request_form_note = client.post_note(openreview.Note( | ||
request_form_note = openreview.Note( | ||
invitation=support_group_id +'/-/Request_Form', | ||
signatures=['~ProgramChair_User1'], | ||
readers=[ | ||
|
@@ -196,7 +196,7 @@ def test_venue_deployment(self, client, selenium, request_page, helpers, openrev | |
'program_chair_emails': [ | ||
'[email protected]', | ||
'[email protected]'], | ||
'contact_email': '[email protected]', | ||
'contact_email': '[email protected], [email protected]', | ||
'publication_chairs':'No, our venue does not have Publication Chairs', | ||
'Area Chairs (Metareviewers)': 'No, our venue does not have Area Chairs', | ||
'Venue Start Date': start_date.strftime('%Y/%m/%d'), | ||
|
@@ -218,7 +218,13 @@ def test_venue_deployment(self, client, selenium, request_page, helpers, openrev | |
'submission_name': 'Submission_Test', | ||
'api_version': '2', | ||
'submission_license': ['CC BY 4.0'], | ||
})) | ||
}) | ||
|
||
with pytest.raises(openreview.OpenReviewException, match=r'contact_email must be a single, valid email address'): | ||
client.post_note(request_form_note) | ||
|
||
request_form_note.content['contact_email'] = '[email protected]' | ||
request_form_note = client.post_note(request_form_note) | ||
|
||
assert request_form_note | ||
request_page(selenium, 'http://localhost:3030/forum?id=' + request_form_note.forum, client.token) | ||
|