From eea3b31105f411c385df126e77102ac9207f490a Mon Sep 17 00:00:00 2001 From: Sylvia Pearce Date: Fri, 17 Jul 2015 16:12:53 +0000 Subject: [PATCH] Delete white spaces that are causing test failures --- common/djangoapps/enrollment/views.py | 6 ++-- lms/djangoapps/mobile_api/users/views.py | 6 ++-- .../core/djangoapps/profile_images/views.py | 28 +++++++++---------- .../djangoapps/user_api/accounts/views.py | 4 +-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/common/djangoapps/enrollment/views.py b/common/djangoapps/enrollment/views.py index 9c9d4b7ce3..b558828e7e 100644 --- a/common/djangoapps/enrollment/views.py +++ b/common/djangoapps/enrollment/views.py @@ -308,11 +308,11 @@ class EnrollmentListView(APIView, ApiKeyPermissionMixIn): GET /api/enrollment/v1/enrollment POST /api/enrollment/v1/enrollment { - + "mode": "credit", "course_details":{"course_id": "edX/DemoX/Demo_Course"}, "enrollment_attributes":[{"namespace": "credit","name": "provider_id","value": "hogwarts",},] - + } **POST Parameters** @@ -353,7 +353,7 @@ class EnrollmentListView(APIView, ApiKeyPermissionMixIn): * mode: Optional. The course mode for the enrollment. Individual users cannot upgrade their enrollment mode from "honor". Only server-to-server requests can enroll with other modes. - + * user: Optional. The user ID of the currently logged in user. You cannot use the command to enroll a different user. diff --git a/lms/djangoapps/mobile_api/users/views.py b/lms/djangoapps/mobile_api/users/views.py index 4622c9c435..c73084195b 100644 --- a/lms/djangoapps/mobile_api/users/views.py +++ b/lms/djangoapps/mobile_api/users/views.py @@ -81,9 +81,9 @@ class UserCourseStatus(views.APIView): PATCH /api/mobile/v0.5/users/{username}/course_status_info/{course_id} **PATCH Parameters** - - The body of the PATCH request can include the following parameters. - + + The body of the PATCH request can include the following parameters. + * last_visited_module_id={module_id} * modification_date={date} diff --git a/openedx/core/djangoapps/profile_images/views.py b/openedx/core/djangoapps/profile_images/views.py index 6d868a3a5d..c0abce9109 100644 --- a/openedx/core/djangoapps/profile_images/views.py +++ b/openedx/core/djangoapps/profile_images/views.py @@ -50,22 +50,22 @@ class ProfileImageUploadView(APIView): **Example Responses** - When the requesting user tries to upload the image for a different user, the + When the requesting user tries to upload the image for a different user, the request returns one of the following responses. - * If the requesting user has staff access, the request returns an HTTP 403 + * If the requesting user has staff access, the request returns an HTTP 403 "Forbidden" response. * If the requesting user does not have staff access, the request returns an HTTP 404 "Not Found" response. - * If no user matches the "username" parameter, the request returns an HTTP + * If no user matches the "username" parameter, the request returns an HTTP 404 "Not Found" response. - * If the upload could not be performed, the request returns an HTTP 400 "Bad + * If the upload could not be performed, the request returns an HTTP 400 "Bad Request" response with more information. - * If the upload is successful, the request returns an HTTP 204 "No Content" + * If the upload is successful, the request returns an HTTP 204 "No Content" response with no additional content. """ @@ -141,20 +141,20 @@ class ProfileImageRemoveView(APIView): **Example Responses** - When the requesting user tries to remove the profile image for a different user, the - request returns one of the following responses. + When the requesting user tries to remove the profile image for a + different user, the request returns one of the following responses. - * If the user does not have staff access, the request returns an HTTP + * If the user does not have staff access, the request returns an HTTP 404 "Not Found" response. - * If no user matches the "username" parameter, the request returns an HTTP - 404 "Not Found" response. + * If no user matches the "username" parameter, the request returns an + HTTP 404 "Not Found" response. - * If the image could not be removed, the request returns an HTTP 400 "Bad - Request" response with more information. + * If the image could not be removed, the request returns an HTTP 400 + "Bad Request" response with more information. - * If the request successfully removes the image, the request returns an - HTTP 204 "No Content" response with no additional content. + * If the request successfully removes the image, the request returns + an HTTP 204 "No Content" response with no additional content. """ diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index f25f4fc220..e05c937de5 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -83,7 +83,7 @@ class AccountView(APIView): address, or null. * name: The full name of the user. * profile_image: A JSON representation of a user's profile image - information. This representation has the following keys. + information. This representation has the following keys. * "has_image": Boolean indicating whether the user has a profile image. @@ -99,7 +99,7 @@ class AccountView(APIView): For all text fields, plain text instead of HTML is supported. The data is stored exactly as specified. Clients must HTML escape - rendered values to avoid script injections. + rendered values to avoid script injections. If a user who does not have "is_staff" access requests account information for a different user, only a subset of these fields is