mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 08:59:44 +08:00
change: rename folder, templates => static
This commit is contained in:
@@ -47,7 +47,7 @@ HttpRunner is rich documented.
|
||||
|
||||
关注 HttpRunner 的微信公众号,第一时间获得最新资讯。
|
||||
|
||||

|
||||

|
||||
|
||||
[Requests]: http://docs.python-requests.org/en/master/
|
||||
[unittest]: https://docs.python.org/3/library/unittest.html
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# encoding: utf-8
|
||||
|
||||
import io
|
||||
import os
|
||||
import platform
|
||||
@@ -9,8 +7,8 @@ from base64 import b64encode
|
||||
from collections import Iterable
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
from jinja2 import Template, escape
|
||||
from requests.cookies import RequestsCookieJar
|
||||
|
||||
from httprunner import __version__, logger
|
||||
from httprunner.compat import basestring, bytes, json, numeric_types
|
||||
@@ -150,7 +148,7 @@ def __stringify_request(request_data):
|
||||
# class instance, e.g. MultipartEncoder()
|
||||
value = repr(value)
|
||||
|
||||
elif isinstance(value, requests.cookies.RequestsCookieJar):
|
||||
elif isinstance(value, RequestsCookieJar):
|
||||
value = value.get_dict()
|
||||
|
||||
request_data[key] = value
|
||||
@@ -209,7 +207,7 @@ def __stringify_response(response_data):
|
||||
# class instance, e.g. MultipartEncoder()
|
||||
value = repr(value)
|
||||
|
||||
elif isinstance(value, requests.cookies.RequestsCookieJar):
|
||||
elif isinstance(value, RequestsCookieJar):
|
||||
value = value.get_dict()
|
||||
|
||||
response_data[key] = value
|
||||
@@ -283,7 +281,7 @@ def render_html_report(summary, report_template=None, report_dir=None, report_fi
|
||||
if not report_template:
|
||||
report_template = os.path.join(
|
||||
os.path.abspath(os.path.dirname(__file__)),
|
||||
"templates",
|
||||
"static",
|
||||
"report_template.html"
|
||||
)
|
||||
logger.log_debug("No html report template specified, use default.")
|
||||
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -17,7 +17,7 @@ classifiers = [
|
||||
"Topic :: Software Development :: Libraries :: Python Modules"
|
||||
]
|
||||
|
||||
include = ["CHANGELOG.md", "httprunner/templates/*"]
|
||||
include = ["CHANGELOG.md", "httprunner/static/*"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "~2.7 || ^3.5"
|
||||
|
||||
Reference in New Issue
Block a user