#78: merge validators in test with api validators

This commit is contained in:
httprunner
2018-01-16 19:28:07 +08:00
parent 4ead306951
commit 488585fdc5
7 changed files with 186 additions and 64 deletions

View File

@@ -220,10 +220,10 @@ class VariableBindsUnittest(ApiServerUnittest):
def test_do_validation(self):
self.context.do_validation(
{"check_item": "check_item", "check_value": 1, "expect_value": 1, "comparator": "eq"}
{"check": "check", "check_value": 1, "expect": 1, "comparator": "eq"}
)
self.context.do_validation(
{"check_item": "check_item", "check_value": "abc", "expect_value": "abc", "comparator": "=="}
{"check": "check", "check_value": "abc", "expect": "abc", "comparator": "=="}
)
config_dict = {
@@ -231,7 +231,7 @@ class VariableBindsUnittest(ApiServerUnittest):
}
self.context.config_context(config_dict, "testset")
self.context.do_validation(
{"check_item": "status_code", "check_value": "201", "expect_value": 3, "comparator": "sum_status_code"}
{"check": "status_code", "check_value": "201", "expect": 3, "comparator": "sum_status_code"}
)
def test_validate(self):