mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-26 19:00:05 +08:00
change: update unit tests for removing v1 format
This commit is contained in:
@@ -1,18 +1,9 @@
|
||||
- config:
|
||||
config:
|
||||
name: basic test with httpbin
|
||||
base_url: https://httpbin.org/
|
||||
|
||||
#- test:
|
||||
# TODO: fix compatibility with Python 2.7, UnicodeDecodeError
|
||||
# name: index
|
||||
# request:
|
||||
# url: /
|
||||
# method: GET
|
||||
# validate:
|
||||
# - eq: ["status_code", 200]
|
||||
# - contains: [content, "HTTP Request & Response Service"]
|
||||
|
||||
- test:
|
||||
teststeps:
|
||||
-
|
||||
name: headers
|
||||
request:
|
||||
url: /headers
|
||||
@@ -21,7 +12,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
- eq: [content.headers.Host, "httpbin.org"]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: user-agent
|
||||
request:
|
||||
url: /user-agent
|
||||
@@ -30,7 +21,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
- startswith: [content.user-agent, "python-requests"]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: get without params
|
||||
request:
|
||||
url: /get
|
||||
@@ -39,7 +30,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
- eq: [content.args, {}]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: get with params in url
|
||||
request:
|
||||
url: /get?a=1&b=2
|
||||
@@ -48,7 +39,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
- eq: [content.args, {'a': '1', 'b': '2'}]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: get with params in params field
|
||||
request:
|
||||
url: /get
|
||||
@@ -60,7 +51,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
- eq: [content.args, {'a': '1', 'b': '2'}]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: set cookie
|
||||
request:
|
||||
url: /cookies/set?name=value
|
||||
@@ -69,7 +60,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
# - eq: [cookies.name, "value"]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: extract cookie
|
||||
request:
|
||||
url: /cookies
|
||||
@@ -78,7 +69,7 @@
|
||||
- eq: ["status_code", 200]
|
||||
# - eq: [cookies.name, "value"]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: post data
|
||||
request:
|
||||
url: /post
|
||||
@@ -89,7 +80,7 @@
|
||||
validate:
|
||||
- eq: ["status_code", 200]
|
||||
|
||||
- test:
|
||||
-
|
||||
name: validate content length
|
||||
request:
|
||||
url: /spec.json
|
||||
|
||||
Reference in New Issue
Block a user