mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-20 07:40:32 +08:00
fix startswith endswith and unittest
Change-Id: I3e1c6fd82812d13b4e23ecd6b23c4d57170852e1
This commit is contained in:
@@ -22,6 +22,7 @@ func TestCaseConfigVariables(t *testing.T) {
|
||||
WithHeaders(map[string]string{"User-Agent": "$agent"}).
|
||||
Validate().
|
||||
AssertEqual("status_code", "$expectedStatusCode", "check status code").
|
||||
AssertEqual("headers.\"Content-Type\"", "application/json; charset=utf-8", "check header Content-Type").
|
||||
AssertEqual("body.args.foo1", "bar1", "check args foo1").
|
||||
AssertEqual("body.args.foo2", "bar2", "check args foo2").
|
||||
AssertEqual("body.headers.\"user-agent\"", "HttpRunnerPlus", "check header user agent"),
|
||||
@@ -51,6 +52,7 @@ func TestCaseStepVariables(t *testing.T) {
|
||||
WithHeaders(map[string]string{"User-Agent": "$agent"}).
|
||||
Validate().
|
||||
AssertEqual("status_code", "$expectedStatusCode", "check status code").
|
||||
AssertEqual("headers.\"Content-Type\"", "application/json; charset=utf-8", "check header Content-Type").
|
||||
AssertEqual("body.args.foo1", "bar1", "check args foo1").
|
||||
AssertEqual("body.args.foo2", "bar2", "check args foo2").
|
||||
AssertEqual("body.headers.\"user-agent\"", "HttpRunnerPlus", "check header user agent"),
|
||||
@@ -84,6 +86,7 @@ func TestCaseOverrideConfigVariables(t *testing.T) {
|
||||
WithHeaders(map[string]string{"User-Agent": "$agent"}).
|
||||
Validate().
|
||||
AssertEqual("status_code", "$expectedStatusCode", "check status code").
|
||||
AssertEqual("headers.\"Content-Type\"", "application/json; charset=utf-8", "check header Content-Type").
|
||||
AssertEqual("body.args.foo1", "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