Passing full name to E-Commerce API

This commit is contained in:
Nickersoft
2015-05-15 15:02:10 +00:00
parent fe3326d8f2
commit 5359ff9d71
3 changed files with 3 additions and 2 deletions

View File

@@ -16,4 +16,4 @@ def create_tracking_context(user):
def ecommerce_api_client(user):
""" Returns an E-Commerce API client setup with authentication for the specified user. """
return EcommerceApiClient(settings.ECOMMERCE_API_URL, settings.ECOMMERCE_API_SIGNING_KEY, user.username,
user.email, tracking_context=create_tracking_context(user))
user.profile.name, user.email, tracking_context=create_tracking_context(user))

View File

@@ -58,6 +58,7 @@ class EcommerceApiClientTest(TestCase):
actual_header = httpretty.last_request().headers['Authorization']
expected_payload = {
'username': self.user.username,
'full_name': self.user.profile.name,
'email': self.user.email,
'tracking_context': {
'lms_user_id': self.user.id, # pylint: disable=no-member

View File

@@ -50,7 +50,7 @@ git+https://github.com/edx/edx-lint.git@8bf82a32ecb8598c415413df66f5232ab8d974e9
-e git+https://github.com/edx/xblock-utils.git@581ed636c862b286002bb9a3724cc883570eb54c#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/edx-reverification-block.git@2ff0d21f6614874067168bd244e68d8215041f3b#egg=edx-reverification-block
git+https://github.com/edx/ecommerce-api-client.git@0.4.3#egg=ecommerce-api-client==0.4.3
git+https://github.com/edx/ecommerce-api-client.git@1.0.0#egg=ecommerce-api-client==1.0.0
# Third Party XBlocks
-e git+https://github.com/mitodl/edx-sga@172a90fd2738f8142c10478356b2d9ed3e55334a#egg=edx-sga