Commit 2efa51e6 authored by adam's avatar adam

cokowliek kurwa

parent 895c3acf
...@@ -47,12 +47,12 @@ class Test: ...@@ -47,12 +47,12 @@ class Test:
print "Test {0} OK!".format(scenario["name"]) print "Test {0} OK!".format(scenario["name"])
else: else:
print "Test {0} failed!".format(scenario["name"]) print "Test {0} failed!".format(scenario["name"])
if scenario.get("expected_output"):
def send_post_request(self, scenario): if scenario.get("expected_output") == res.json():
if scenario.get("user"): print "Test {0} OK!".format(scenario["name"])
auth = (scenario["user"]["login"], scenario["user"]["password"]) return
else: print "Test {0}, expected {1} but got {2}!".format(scenario["name"],
auth = None scenario["expected_output"], res.json())
res = requests.post(scenario["url"], auth=auth, data=scenario.get("payload")) res = requests.post(scenario["url"], auth=auth, data=scenario.get("payload"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment