Updated for changes in BlenderID validate_token URL and response.

See BlenderID change 432034f858fbfd695f3ce0a0b3724524de7a05bb
This commit is contained in:
2016-04-15 12:19:43 +02:00
parent 66eeb25529
commit 0bdd3b0a31
2 changed files with 4 additions and 4 deletions

View File

@@ -114,7 +114,7 @@ def validate_token(user_id, token, oauth_subclient_id):
if oauth_subclient_id:
payload['subclient_id'] = oauth_subclient_id
url = '{0}/subclients/validate_token'.format(blender_id_endpoint())
url = '{0}/u/validate_token'.format(blender_id_endpoint())
log.debug('POSTing to %r', url)
# POST to Blender ID, handling errors as negative verification results.

View File

@@ -97,15 +97,15 @@ class AbstractPillarTest(TestMinimal):
"""Sets up Responses to mock unhappy validation flow."""
responses.add(responses.POST,
'%s/subclients/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
'%s/u/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
json={'status': 'fail'},
status=404)
status=403)
def mock_blenderid_validate_happy(self):
"""Sets up Responses to mock happy validation flow."""
responses.add(responses.POST,
'%s/subclients/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
'%s/u/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
json=BLENDER_ID_USER_RESPONSE,
status=200)