define httpbin host and port in one place

This commit is contained in:
httprunner
2018-08-02 11:29:01 +08:00
parent fd5c93f907
commit 61deb3ab9d
11 changed files with 150 additions and 33 deletions

View File

@@ -3,7 +3,7 @@ import shutil
from httprunner import HttpRunner
from httprunner.exceptions import FileNotFound
from tests.base import ApiServerUnittest
from tests.base import HTTPBIN_SERVER, ApiServerUnittest
class TestHttpRunner(ApiServerUnittest):
@@ -118,7 +118,7 @@ class TestHttpRunner(ApiServerUnittest):
{
"name": "post data",
"request": {
"url": "http://127.0.0.1:3458/post",
"url": "{}/post".format(HTTPBIN_SERVER),
"method": "POST",
"headers": {
"Content-Type": "application/json"