Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
8e08ff52
Commit
8e08ff52
authored
10 years ago
by
Daniel Friedman
Committed by
Andy Armstrong
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rebase cleanup
parent
6f6fdbfb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openedx/core/djangoapps/user_api/accounts/tests/test_api.py
+11
-0
11 additions, 0 deletions
openedx/core/djangoapps/user_api/accounts/tests/test_api.py
openedx/core/djangoapps/user_api/accounts/tests/test_views.py
+2
-2
2 additions, 2 deletions
...edx/core/djangoapps/user_api/accounts/tests/test_views.py
with
13 additions
and
2 deletions
openedx/core/djangoapps/user_api/accounts/tests/test_api.py
+
11
−
0
View file @
8e08ff52
...
...
@@ -178,6 +178,11 @@ class TestAccountApi(TestCase):
self
.
assertEqual
(
0
,
len
(
pending_change
))
@patch
(
'
openedx.core.djangoapps.user_api.accounts.helpers._PROFILE_IMAGE_SIZES
'
,
[
50
,
10
])
@patch.dict
(
'
openedx.core.djangoapps.user_api.accounts.helpers.PROFILE_IMAGE_SIZES_MAP
'
,
{
'
full
'
:
50
,
'
small
'
:
10
},
clear
=
True
)
@unittest.skipUnless
(
settings
.
ROOT_URLCONF
==
'
lms.urls
'
,
'
Account APIs are only supported in LMS
'
)
class
AccountSettingsOnCreationTest
(
TestCase
):
USERNAME
=
u
'
frank-underwood
'
...
...
@@ -209,6 +214,12 @@ class AccountSettingsOnCreationTest(TestCase):
'
mailing_address
'
:
None
,
'
year_of_birth
'
:
None
,
'
country
'
:
None
,
'
bio
'
:
None
,
'
profile_image
'
:
{
'
has_image
'
:
False
,
'
image_url_full
'
:
'
http://example-storage.com/profile_images/default_50.jpg
'
,
'
image_url_small
'
:
'
http://example-storage.com/profile_images/default_10.jpg
'
,
},
})
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/user_api/accounts/tests/test_views.py
+
2
−
2
View file @
8e08ff52
...
...
@@ -153,7 +153,7 @@ class TestAccountAPI(UserAPITestCase):
Verify that all account fields are returned (even those that are not shareable).
"""
data
=
response
.
data
self
.
assertEqual
(
1
3
,
len
(
data
))
self
.
assertEqual
(
1
4
,
len
(
data
))
self
.
assertEqual
(
self
.
user
.
username
,
data
[
"
username
"
])
self
.
assertEqual
(
self
.
user
.
first_name
+
"
"
+
self
.
user
.
last_name
,
data
[
"
name
"
])
self
.
assertEqual
(
"
US
"
,
data
[
"
country
"
])
...
...
@@ -269,7 +269,7 @@ class TestAccountAPI(UserAPITestCase):
def
verify_get_own_information
():
response
=
self
.
send_get
(
self
.
client
)
data
=
response
.
data
self
.
assertEqual
(
1
3
,
len
(
data
))
self
.
assertEqual
(
1
4
,
len
(
data
))
self
.
assertEqual
(
self
.
user
.
username
,
data
[
"
username
"
])
self
.
assertEqual
(
self
.
user
.
first_name
+
"
"
+
self
.
user
.
last_name
,
data
[
"
name
"
])
for
empty_field
in
(
"
year_of_birth
"
,
"
level_of_education
"
,
"
mailing_address
"
,
"
bio
"
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment