Commit 88bfeafe by Jim Abramson

Merge pull request #10274 from edx/jsa/update-erac

Update from ecommerce-api-client 1.1 to edx-rest-api-client 1.2
parents 9295b37d 56b7b700
...@@ -186,10 +186,10 @@ MOCK_MODULES = [ ...@@ -186,10 +186,10 @@ MOCK_MODULES = [
'xmodule.course_module', 'xmodule.course_module',
'user_api.accounts.api', 'user_api.accounts.api',
'user_api.accounts.serializers', 'user_api.accounts.serializers',
'ecommerce_api_client', 'edx_rest_api_client',
'client', 'client',
'ecommerce_api_client.client', 'edx_rest_api_client.client',
'ecommerce_api_client.exceptions', 'edx_rest_api_client.exceptions',
'student.auth', 'student.auth',
'ccx_keys', 'ccx_keys',
'ccx_keys.locator', 'ccx_keys.locator',
......
""" Commerce app. """ """ Commerce app. """
from django.conf import settings from django.conf import settings
from ecommerce_api_client.client import EcommerceApiClient from edx_rest_api_client.client import EdxRestApiClient
from eventtracking import tracker from eventtracking import tracker
...@@ -26,7 +26,7 @@ def is_commerce_service_configured(): ...@@ -26,7 +26,7 @@ def is_commerce_service_configured():
def ecommerce_api_client(user): def ecommerce_api_client(user):
""" Returns an E-Commerce API client setup with authentication for the specified user. """ """ Returns an E-Commerce API client setup with authentication for the specified user. """
return EcommerceApiClient(settings.ECOMMERCE_API_URL, return EdxRestApiClient(settings.ECOMMERCE_API_URL,
settings.ECOMMERCE_API_SIGNING_KEY, settings.ECOMMERCE_API_SIGNING_KEY,
user.username, user.username,
user.profile.name, user.profile.name,
......
...@@ -18,7 +18,7 @@ from commerce.tests import TEST_BASKET_ID, TEST_ORDER_NUMBER, TEST_PAYMENT_DATA, ...@@ -18,7 +18,7 @@ from commerce.tests import TEST_BASKET_ID, TEST_ORDER_NUMBER, TEST_PAYMENT_DATA,
from commerce.tests.mocks import mock_basket_order, mock_create_basket from commerce.tests.mocks import mock_basket_order, mock_create_basket
from commerce.tests.test_views import UserMixin from commerce.tests.test_views import UserMixin
from course_modes.models import CourseMode from course_modes.models import CourseMode
from ecommerce_api_client import exceptions from edx_rest_api_client import exceptions
from embargo.test_utils import restrict_course from embargo.test_utils import restrict_course
from enrollment.api import get_enrollment from enrollment.api import get_enrollment
from openedx.core.lib.django_test_client_utils import get_absolute_url from openedx.core.lib.django_test_client_utils import get_absolute_url
......
""" API v0 views. """ """ API v0 views. """
import logging import logging
from ecommerce_api_client import exceptions from edx_rest_api_client import exceptions
from opaque_keys import InvalidKeyError from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.keys import CourseKey
from rest_framework.authentication import SessionAuthentication from rest_framework.authentication import SessionAuthentication
......
...@@ -9,7 +9,7 @@ from django.conf import settings ...@@ -9,7 +9,7 @@ from django.conf import settings
from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import AnonymousUser
from django.dispatch import receiver from django.dispatch import receiver
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from ecommerce_api_client.exceptions import HttpClientError from edx_rest_api_client.exceptions import HttpClientError
import requests import requests
from microsite_configuration import microsite from microsite_configuration import microsite
......
...@@ -11,7 +11,7 @@ import httpretty ...@@ -11,7 +11,7 @@ import httpretty
import jwt import jwt
import mock import mock
from ecommerce_api_client import auth from edx_rest_api_client import auth
from commerce import ecommerce_api_client from commerce import ecommerce_api_client
from student.tests.factories import UserFactory from student.tests.factories import UserFactory
...@@ -29,14 +29,14 @@ TEST_PAYMENT_DATA = { ...@@ -29,14 +29,14 @@ TEST_PAYMENT_DATA = {
@override_settings(ECOMMERCE_API_SIGNING_KEY=TEST_API_SIGNING_KEY, ECOMMERCE_API_URL=TEST_API_URL) @override_settings(ECOMMERCE_API_SIGNING_KEY=TEST_API_SIGNING_KEY, ECOMMERCE_API_URL=TEST_API_URL)
class EcommerceApiClientTest(TestCase): class EdxRestApiClientTest(TestCase):
""" Tests to ensure the client is initialized properly. """ """ Tests to ensure the client is initialized properly. """
TEST_USER_EMAIL = 'test@example.com' TEST_USER_EMAIL = 'test@example.com'
TEST_CLIENT_ID = 'test-client-id' TEST_CLIENT_ID = 'test-client-id'
def setUp(self): def setUp(self):
super(EcommerceApiClientTest, self).setUp() super(EdxRestApiClientTest, self).setUp()
self.user = UserFactory() self.user = UserFactory()
self.user.email = self.TEST_USER_EMAIL self.user.email = self.TEST_USER_EMAIL
......
...@@ -33,7 +33,7 @@ from commerce import ecommerce_api_client ...@@ -33,7 +33,7 @@ from commerce import ecommerce_api_client
from commerce.utils import audit_log from commerce.utils import audit_log
from course_modes.models import CourseMode from course_modes.models import CourseMode
from courseware.url_helpers import get_redirect_url from courseware.url_helpers import get_redirect_url
from ecommerce_api_client.exceptions import SlumberBaseException from edx_rest_api_client.exceptions import SlumberBaseException
from edxmako.shortcuts import render_to_response, render_to_string from edxmako.shortcuts import render_to_response, render_to_string
from embargo import api as embargo_api from embargo import api as embargo_api
from microsite_configuration import microsite from microsite_configuration import microsite
......
...@@ -30,6 +30,7 @@ django-storages==1.1.5 ...@@ -30,6 +30,7 @@ django-storages==1.1.5
django-method-override==0.1.0 django-method-override==0.1.0
djangorestframework>=3.1,<3.2 djangorestframework>=3.1,<3.2
django==1.4.22 django==1.4.22
edx-rest-api-client==1.2.0
elasticsearch==0.4.5 elasticsearch==0.4.5
facebook-sdk==0.4.0 facebook-sdk==0.4.0
feedparser==5.1.3 feedparser==5.1.3
......
...@@ -54,7 +54,6 @@ git+https://github.com/edx/edx-lint.git@v0.3.0#egg=edx_lint==0.3.0 ...@@ -54,7 +54,6 @@ git+https://github.com/edx/edx-lint.git@v0.3.0#egg=edx_lint==0.3.0
-e git+https://github.com/edx/xblock-utils.git@213a97a50276d6a2504d8133650b2930ead357a0#egg=xblock-utils -e git+https://github.com/edx/xblock-utils.git@213a97a50276d6a2504d8133650b2930ead357a0#egg=xblock-utils
-e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive -e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive
git+https://github.com/edx/edx-reverification-block.git@0.0.4#egg=edx-reverification-block==0.0.4 git+https://github.com/edx/edx-reverification-block.git@0.0.4#egg=edx-reverification-block==0.0.4
git+https://github.com/edx/ecommerce-api-client.git@1.1.0#egg=ecommerce-api-client==1.1.0
-e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client -e git+https://github.com/edx/edx-user-state-client.git@30c0ad4b9f57f8d48d6943eb585ec8a9205f4469#egg=edx-user-state-client
git+https://github.com/edx/edx-organizations.git@release-2015-09-22#egg=edx-organizations==0.1.6 git+https://github.com/edx/edx-organizations.git@release-2015-09-22#egg=edx-organizations==0.1.6
git+https://github.com/edx/edx-proctoring.git@0.9.16#egg=edx-proctoring==0.9.16 git+https://github.com/edx/edx-proctoring.git@0.9.16#egg=edx-proctoring==0.9.16
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment