-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add utf-8 encoding for user fields (#477)
- Loading branch information
Showing
4 changed files
with
11 additions
and
7 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
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 |
---|---|---|
|
@@ -957,7 +957,8 @@ def setUp(self): | |
fake_user_email = '[email protected]' | ||
fake_user.emails = [fake_user_email] | ||
|
||
full_name_mock = PropertyMock(return_value='fake_full_name') | ||
fake_name = 'fáke fǔll ñamë' | ||
full_name_mock = PropertyMock(return_value=fake_name) | ||
type(fake_user).full_name = full_name_mock | ||
|
||
fake_username = 'fake' | ||
|
@@ -1077,7 +1078,7 @@ def test_lti_launch_pii_sharing( | |
|
||
set_user_data_kwargs['person_sourcedid'] = 'fake' if pii_sharing_enabled and ask_to_send_username else None | ||
set_user_data_kwargs['person_name_full'] = ( | ||
'fake_full_name' if pii_sharing_enabled and ask_to_send_full_name else None | ||
'fáke fǔll ñamë'.encode() if pii_sharing_enabled and ask_to_send_full_name else None | ||
) | ||
set_user_data_kwargs['person_contact_email_primary'] = ( | ||
'[email protected]' if pii_sharing_enabled and ask_to_send_email else None | ||
|
@@ -1814,7 +1815,7 @@ def test_get_lti_1p3_launch_data( | |
fake_user_email = '[email protected]' | ||
fake_username = 'fake_username' | ||
|
||
fake_name = 'fake_full_name' | ||
fake_name = 'fáke fǔll ñamë' | ||
full_name_mock = PropertyMock(return_value=fake_name) | ||
type(fake_user).full_name = full_name_mock | ||
|
||
|
@@ -1866,7 +1867,7 @@ def test_get_lti_1p3_launch_data( | |
expected_launch_data_kwargs["preferred_username"] = fake_username | ||
|
||
if ask_to_send_full_name: | ||
expected_launch_data_kwargs["name"] = fake_name | ||
expected_launch_data_kwargs["name"] = fake_name.encode() | ||
|
||
if ask_to_send_email: | ||
expected_launch_data_kwargs["email"] = fake_user_email | ||
|