Updated for changes in BlenderID validate_token URL and response.
See BlenderID change 432034f858fbfd695f3ce0a0b3724524de7a05bb
This commit is contained in:
@@ -114,7 +114,7 @@ def validate_token(user_id, token, oauth_subclient_id):
|
|||||||
if oauth_subclient_id:
|
if oauth_subclient_id:
|
||||||
payload['subclient_id'] = 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)
|
log.debug('POSTing to %r', url)
|
||||||
|
|
||||||
# POST to Blender ID, handling errors as negative verification results.
|
# POST to Blender ID, handling errors as negative verification results.
|
||||||
|
@@ -97,15 +97,15 @@ class AbstractPillarTest(TestMinimal):
|
|||||||
"""Sets up Responses to mock unhappy validation flow."""
|
"""Sets up Responses to mock unhappy validation flow."""
|
||||||
|
|
||||||
responses.add(responses.POST,
|
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'},
|
json={'status': 'fail'},
|
||||||
status=404)
|
status=403)
|
||||||
|
|
||||||
def mock_blenderid_validate_happy(self):
|
def mock_blenderid_validate_happy(self):
|
||||||
"""Sets up Responses to mock happy validation flow."""
|
"""Sets up Responses to mock happy validation flow."""
|
||||||
|
|
||||||
responses.add(responses.POST,
|
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,
|
json=BLENDER_ID_USER_RESPONSE,
|
||||||
status=200)
|
status=200)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user