# NOTE: Generated By Pastor v3.1.7
# FROM: validate.yml


from pastor import Pastor, Config, Step, RunRequest, RunTestCase


class TestCaseValidate(Pastor):

    config = Config("basic test with httpbin").base_url("http://httpbin.org/")

    teststeps = [
        Step(
            RunRequest("validate response with json path")
            .get("/get")
            .with_params(**{"a": 1, "b": 2})
            .validate()
            .assert_equal("status_code", 200)
            .assert_equal("body.args.a", "1")
            .assert_equal("body.args.b", "2")
        ),
        Step(
            RunRequest("validate response with python script")
            .get("/get")
            .with_params(**{"a": 1, "b": 2})
            .validate()
            .assert_equal("status_code", 200)
        ),
    ]


if __name__ == "__main__":
    TestCaseValidate().test_start()
