-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 404 instead of 300 for ambiguous email_or_person (#8004)
* fix: 404 on CommunityList name collision * fix: 404 on ambiuous person for photo() view * test: update tests --------- Co-authored-by: Robert Sparks <[email protected]>
- Loading branch information
1 parent
db4ff66
commit a338df1
Showing
4 changed files
with
19 additions
and
45 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 |
---|---|---|
|
@@ -95,9 +95,7 @@ def test_view_list_duplicates(self): | |
|
||
url = urlreverse(ietf.community.views.view_list, kwargs={ "email_or_name": person.plain_name()}) | ||
r = self.client.get(url) | ||
self.assertEqual(r.status_code, 300) | ||
self.assertIn("[email protected]", r.content.decode()) | ||
self.assertIn("[email protected]", r.content.decode()) | ||
self.assertEqual(r.status_code, 404) | ||
|
||
def complex_person(self, *args, **kwargs): | ||
person = PersonFactory(*args, **kwargs) | ||
|
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 |
---|---|---|
|
@@ -173,9 +173,7 @@ def test_person_photo_duplicates(self): | |
|
||
url = urlreverse("ietf.person.views.photo", kwargs={ "email_or_name": person.plain_name()}) | ||
r = self.client.get(url) | ||
self.assertEqual(r.status_code, 300) | ||
self.assertIn("[email protected]", r.content.decode()) | ||
self.assertIn("[email protected]", r.content.decode()) | ||
self.assertEqual(r.status_code, 404) | ||
|
||
def test_name_methods(self): | ||
person = PersonFactory(name="Dr. Jens F. Möller", ) | ||
|
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