From f7ee3b8a16eebf05d2a6253b5f672bedebbe0286 Mon Sep 17 00:00:00 2001 From: Xavier Fontanet Date: Wed, 10 Jul 2024 18:13:01 +0200 Subject: [PATCH] simplify --- concurrent_requests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/concurrent_requests.py b/concurrent_requests.py index 728a8c0..07d1090 100644 --- a/concurrent_requests.py +++ b/concurrent_requests.py @@ -28,13 +28,13 @@ def fPar(param): def mPar(param): return '&' + param + '=' + str(parameters[param]) -def mRandPar(param): +def mRandPar(param): #takes a random value from the list of values (comma separated) options = parameters[param].split(', ') selected = random.choice(options) return '&' + param + '=' + selected def nextUrl(id): - url = "http://" + endpoint + '/' + module + '/' + service + fPar('firsParam') + mRandPar('multipleValueParam') + mPar('otherParam') + url = endpoint + fPar('firsParam') + mRandPar('multipleValueParam') + mPar('otherParam') print("Id: {} to call {}".format(id, url)) return (id, url)