diff --git a/test/test_external_jwt_authn.py b/test/test_external_jwt_authn.py index 6b273e4ce..06627baf7 100644 --- a/test/test_external_jwt_authn.py +++ b/test/test_external_jwt_authn.py @@ -12,6 +12,8 @@ from tempfile import NamedTemporaryFile from Crypto.PublicKey import RSA from datetime import datetime, timedelta +_PORT_NUMBER = 5001 + class JWTAuthTestCase(LiveServerTestCase): maxDiff = None @@ -30,6 +32,9 @@ class JWTAuthTestCase(LiveServerTestCase): JWTAuthTestCase.private_key_data = private_key_data def create_app(self): + global _PORT_NUMBER + _PORT_NUMBER = _PORT_NUMBER + 1 + users = [ {'name': 'cooluser', 'email': 'user@domain.com', 'password': 'password'}, {'name': 'some.neat.user', 'email': 'neat@domain.com', 'password': 'foobar'} @@ -37,6 +42,7 @@ class JWTAuthTestCase(LiveServerTestCase): jwt_app = Flask('testjwt') private_key = JWTAuthTestCase.private_key_data + jwt_app.config['LIVESERVER_PORT'] = _PORT_NUMBER def _get_basic_auth(): data = base64.b64decode(request.headers['Authorization'][len('Basic '):])