Skip to content

Commit

Permalink
scenarios are always test
Browse files Browse the repository at this point in the history
  • Loading branch information
KaraMelih committed Aug 16, 2024
1 parent ce60d2d commit 371d77d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion snews_pt/auxiliary/try_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
fd_mode = True if sys.argv[1].lower() == "true" else False
is_test = True if sys.argv[2].lower() == "true" else False

if not is_test:
click.secho("This script is only for testing purposes, and uses past neutrino times.\n"
"We are running the scenarios in test mode", fg='red', bold=True)
is_test = True

with open(osp.join(osp.dirname(__file__), "scenarios.json")) as json_file:
data = json.load(json_file)

Expand All @@ -33,7 +38,6 @@
click.secho(f"\n>>> Testing {scenario}", fg='yellow', bold=True)
messages = data[scenario]
for msg in messages: # send one by one and sleep in between
msg['is_test'] = is_test
print(msg, "\n\n")
SNEWSMessageBuilder(**msg).send_messages(firedrill_mode=fd_mode)
time.sleep(1)
Expand Down

0 comments on commit 371d77d

Please sign in to comment.