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
3c64c86e
Commit
3c64c86e
authored
May 19, 2014
by
Matt Drayer
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mattdrayer/api-userscleanup: Added docstrings and changed to fail-fast style
parent
2a923bdc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lms/djangoapps/api_manager/users/tests.py
+3
-3
lms/djangoapps/api_manager/users/views.py
+0
-0
No files found.
lms/djangoapps/api_manager/users/tests.py
View file @
3c64c86e
...
...
@@ -126,7 +126,7 @@ class UsersApiTests(TestCase):
response
=
self
.
do_post
(
test_uri
,
data
)
self
.
assertEqual
(
response
.
status_code
,
409
)
self
.
assertGreater
(
response
.
data
[
'message'
],
0
)
self
.
assertEqual
(
response
.
data
[
'field_conflict'
],
'username'
)
self
.
assertEqual
(
response
.
data
[
'field_conflict'
],
'username
or email
'
)
def
test_user_detail_get
(
self
):
test_uri
=
'/api/users'
...
...
@@ -582,7 +582,7 @@ class UsersApiTests(TestCase):
display_name
=
"Chapter 1"
)
user_id
=
2342334
course_id
=
'asd
fa
9sd8fasdf'
course_id
=
'asd
/fa/
9sd8fasdf'
test_uri
=
'/api/users/{}/courses/{}'
.
format
(
str
(
user_id
),
course_id
)
position_data
=
{
'position'
:
{
...
...
@@ -661,7 +661,7 @@ class UsersApiTests(TestCase):
self
.
assertEqual
(
response
.
data
[
'position'
],
chapter1
.
id
)
def
test_user_courses_detail_get_undefined_user
(
self
):
test_uri
=
'/api/users/2134234/courses/a8df7
asv
d98'
test_uri
=
'/api/users/2134234/courses/a8df7
/asv/
d98'
response
=
self
.
do_get
(
test_uri
)
self
.
assertEqual
(
response
.
status_code
,
404
)
...
...
lms/djangoapps/api_manager/users/views.py
View file @
3c64c86e
This diff is collapsed.
Click to expand it.
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