Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8e08ff52
Commit
8e08ff52
authored
Mar 17, 2015
by
Daniel Friedman
Committed by
Andy Armstrong
Apr 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebase cleanup
parent
6f6fdbfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
openedx/core/djangoapps/user_api/accounts/tests/test_api.py
+11
-0
openedx/core/djangoapps/user_api/accounts/tests/test_views.py
+2
-2
No files found.
openedx/core/djangoapps/user_api/accounts/tests/test_api.py
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'
,
},
})
...
...
openedx/core/djangoapps/user_api/accounts/tests/test_views.py
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"
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment