in src/loadgenerator/locustfile.py [0:0]
def deposit(self, amount=None):
"""
POST to /deposit, depositing external money into account
"""
if amount is None:
amount = random() * 1000
acct_info = {"account_num": choice(TRANSACTION_ACCT_LIST),
"routing_num":"111111111"}
transaction = {"account": json.dumps(acct_info),
"amount": amount,
"uuid": generate_username()}
with self.client.post("/deposit",
data=transaction,
catch_response=True) as response:
if response.url is None or "failed" in response.url:
response.failure("deposit failed")