mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-24 01:40:02 +08:00
fix startswith endswith and unittest
Change-Id: I3e1c6fd82812d13b4e23ecd6b23c4d57170852e1
This commit is contained in:
@@ -58,9 +58,11 @@ func TestCaseExtractStepAssociation(t *testing.T) {
|
||||
WithHeaders(map[string]string{"User-Agent": "$agent"}).
|
||||
Extract().
|
||||
WithJmesPath("status_code", "statusCode").
|
||||
WithJmesPath("headers.\"Content-Type\"", "contentType").
|
||||
WithJmesPath("body.args.foo1", "varFoo1").
|
||||
Validate().
|
||||
AssertEqual("$statusCode", 200, "check status code").
|
||||
AssertEqual("$contentType", "application/json; charset=utf-8", "check header Content-Type").
|
||||
AssertEqual("$varFoo1", "bar1", "check args foo1").
|
||||
AssertEqual("body.args.foo2", "bar2", "check args foo2").
|
||||
AssertEqual("body.headers.\"user-agent\"", "HttpRunnerPlus", "check header user agent"),
|
||||
|
||||
Reference in New Issue
Block a user