1
0
Fork 0
This commit is contained in:
Xavier Fontanet 2024-07-10 18:13:01 +02:00
parent d1e727ad5e
commit f7ee3b8a16
1 changed files with 2 additions and 2 deletions

View File

@ -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)