mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-26 04:23:14 -05:00
locust tests: use new api path
This commit is contained in:
parent
c809872b8d
commit
ba796fddf7
@ -26,7 +26,7 @@ class QuickStartUser(SequentialTaskSet):
|
||||
# TODO: Iterate over parameters for a more comprehensive test
|
||||
captcha_params = {"level":"easy","media":"image/png","input_type":"text"}
|
||||
|
||||
resp = self.client.post(path="/v1/captcha", json=captcha_params, name="/captcha")
|
||||
resp = self.client.post(path="/v2/captcha", json=captcha_params, name="/captcha")
|
||||
if resp.status_code != 200:
|
||||
print("\nError on /captcha endpoint: ")
|
||||
print(resp)
|
||||
@ -36,14 +36,14 @@ class QuickStartUser(SequentialTaskSet):
|
||||
uuid = json.loads(resp.text).get("id")
|
||||
answerBody = {"answer": "qwer123","id": uuid}
|
||||
|
||||
resp = self.client.get(path="/v1/media?id=%s" % uuid, name="/media")
|
||||
resp = self.client.get(path="/v2/media?id=%s" % uuid, name="/media")
|
||||
if resp.status_code != 200:
|
||||
print("\nError on /media endpoint: ")
|
||||
print(resp)
|
||||
print(resp.text)
|
||||
print("----------------END.MEDIA-------------------\n\n")
|
||||
|
||||
resp = self.client.post(path='/v1/answer', json=answerBody, name="/answer")
|
||||
resp = self.client.post(path='/v2/answer', json=answerBody, name="/answer")
|
||||
if resp.status_code != 200:
|
||||
print("\nError on /answer endpoint: ")
|
||||
print(resp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user