Files
httprunner/examples/httpbin/load_image_test.py

49 lines
1.3 KiB
Python

# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
# FROM: examples/httpbin/load_image.yml
from httprunner import HttpRunner, TConfig, TStep
class TestCaseLoadImage(HttpRunner):
config = TConfig(
**{
"name": "load images",
"base_url": "${get_httpbin_server()}",
"path": "examples/httpbin/load_image_test.py",
}
)
teststeps = [
TStep(
**{
"name": "get png image",
"request": {"url": "/image/png", "method": "GET"},
"validate": [{"eq": ["status_code", 200]}],
}
),
TStep(
**{
"name": "get jpeg image",
"request": {"url": "/image/jpeg", "method": "GET"},
"validate": [{"eq": ["status_code", 200]}],
}
),
TStep(
**{
"name": "get webp image",
"request": {"url": "/image/webp", "method": "GET"},
"validate": [{"eq": ["status_code", 200]}],
}
),
TStep(
**{
"name": "get svg image",
"request": {"url": "/image/svg", "method": "GET"},
"validate": [{"eq": ["status_code", 200]}],
}
),
]
if __name__ == "__main__":
TestCaseLoadImage().test_start()