Always use urljoin to construct Blender ID URLs
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import copy
|
||||
import datetime
|
||||
import json
|
||||
from urllib.parse import urljoin
|
||||
|
||||
import pillar.tests.common_test_data as ctd
|
||||
import responses
|
||||
@@ -761,7 +762,7 @@ class UserCreationTest(AbstractPillarTest):
|
||||
'token_expires': 'Mon, 1 Jan 2218 01:02:03 GMT'}
|
||||
|
||||
responses.add(responses.POST,
|
||||
'%s/u/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
|
||||
urljoin(self.app.config['BLENDER_ID_ENDPOINT'], 'u/validate_token'),
|
||||
json=bid_resp,
|
||||
status=200)
|
||||
|
||||
@@ -791,7 +792,7 @@ class UserCreationTest(AbstractPillarTest):
|
||||
'id': ctd.BLENDER_ID_TEST_USERID},
|
||||
'token_expires': 'Mon, 1 Jan 2218 01:02:03 GMT'}
|
||||
responses.add(responses.POST,
|
||||
'%s/u/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
|
||||
urljoin(self.app.config['BLENDER_ID_ENDPOINT'], 'u/validate_token'),
|
||||
json=bid_resp,
|
||||
status=200)
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
import json
|
||||
from urllib.parse import urljoin
|
||||
|
||||
import responses
|
||||
from bson import ObjectId
|
||||
@@ -19,7 +20,7 @@ class BlenderIdSubclientTest(AbstractPillarTest):
|
||||
def test_store_scst_new_user_without_full_name(self):
|
||||
|
||||
responses.add(responses.POST,
|
||||
'%s/u/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
|
||||
urljoin(self.app.config['BLENDER_ID_ENDPOINT'], 'u/validate_token'),
|
||||
json={'status': 'success',
|
||||
'user': {'email': TEST_EMAIL_ADDRESS,
|
||||
'full_name': None,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import typing
|
||||
from urllib.parse import urljoin
|
||||
|
||||
import bson
|
||||
from bson import tz_util
|
||||
@@ -757,7 +758,7 @@ class UserCreationTest(AbstractPillarTest):
|
||||
'token_expires': 'Mon, 1 Jan 2218 01:02:03 GMT'}
|
||||
|
||||
responses.add(responses.POST,
|
||||
'%s/u/validate_token' % self.app.config['BLENDER_ID_ENDPOINT'],
|
||||
urljoin(self.app.config['BLENDER_ID_ENDPOINT'], 'u/validate_token'),
|
||||
json=blender_id_response,
|
||||
status=200)
|
||||
|
||||
|
Reference in New Issue
Block a user