diff options
Diffstat (limited to 'tests/api.py')
-rw-r--r-- | tests/api.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/api.py b/tests/api.py index 9d2f70d..32e1159 100644 --- a/tests/api.py +++ b/tests/api.py @@ -15,12 +15,13 @@ from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import ec from fxa.crypto import quick_stretch_password, derive_key, xor -AUTH_URL = "http://localhost:8000/auth" -PROFILE_URL = "http://localhost:8000/profile" -OAUTH_URL = "http://localhost:8000/oauth" -INVITE_URL = "http://localhost:8000/_invite" -PUSH_PORT = 10264 -SMTP_PORT = 2525 +API_PORT = int(os.environ.get('API_PORT', 8000)) +PUSH_PORT = API_PORT + 1 +SMTP_PORT = int(os.environ.get('MAIL_PORT', 2525)) +AUTH_URL = f"http://localhost:{API_PORT}/auth" +PROFILE_URL = f"http://localhost:{API_PORT}/profile" +OAUTH_URL = f"http://localhost:{API_PORT}/oauth" +INVITE_URL = f"http://localhost:{API_PORT}/_invite" def auth_pw(email, pw): return derive_key(quick_stretch_password(email, pw), "authPW").hex() |