Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tools/send_test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
def load_env(env_path: str) -> None:
if not os.path.isfile(env_path):
raise FileNotFoundError(f".env file not found at: {env_path}")
load_dotenv(env_path)
# override=True ensures that when replay_scenario.py iterates multiple
# sources with different .env files, each source's API_URL and API_KEY
# replace the previously loaded values rather than being silently ignored.
load_dotenv(env_path, override=True)
for var in ("API_URL", "API_KEY"):
if os.getenv(var) is None:
raise EnvironmentError(f"Missing {var} in {env_path}")
Expand Down
Loading