simplify
This commit is contained in:
parent
d1e727ad5e
commit
f7ee3b8a16
|
@ -28,13 +28,13 @@ def fPar(param):
|
||||||
def mPar(param):
|
def mPar(param):
|
||||||
return '&' + param + '=' + str(parameters[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(', ')
|
options = parameters[param].split(', ')
|
||||||
selected = random.choice(options)
|
selected = random.choice(options)
|
||||||
return '&' + param + '=' + selected
|
return '&' + param + '=' + selected
|
||||||
|
|
||||||
def nextUrl(id):
|
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))
|
print("Id: {} to call {}".format(id, url))
|
||||||
return (id, url)
|
return (id, url)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue