locust-cloud 1.5.5__py3-none-any.whl → 1.5.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
locust_cloud/auth.py CHANGED
@@ -7,6 +7,11 @@ import requests
7
7
  import werkzeug
8
8
  from flask import redirect, request, url_for
9
9
  from flask_login import UserMixin, login_user
10
+ from locust_cloud.constants import (
11
+ DEFAULT_DEPLOYER_URL,
12
+ )
13
+
14
+ DEPLOYER_URL = os.environ.get("LOCUSTCLOUD_DEPLOYER_URL", DEFAULT_DEPLOYER_URL)
10
15
 
11
16
 
12
17
  class Credentials(TypedDict):
@@ -62,7 +67,7 @@ def register_auth(environment: locust.env.Environment):
62
67
 
63
68
  try:
64
69
  auth_response = requests.post(
65
- f"{environment.parsed_options.deployer_url}/auth/login",
70
+ f"{DEPLOYER_URL}/auth/login",
66
71
  json={"username": username, "password": password},
67
72
  )
68
73