From 363420053c8b071b166cf5803a0bdd33d60d2a6b Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 18 Dec 2018 16:21:24 +0800 Subject: [PATCH] fix RecursionError caused by locust --- tests/api_server.py | 5 +++-- tests/test_api.py | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/api_server.py b/tests/api_server.py index 187c2227..baadc949 100644 --- a/tests/api_server.py +++ b/tests/api_server.py @@ -10,13 +10,14 @@ try: from httpbin import app as httpbin_app HTTPBIN_HOST = "127.0.0.1" HTTPBIN_PORT = 3458 + HTTPBIN_SERVER = "http://{}:{}".format(HTTPBIN_HOST, HTTPBIN_PORT) except ImportError: httpbin_app = None HTTPBIN_HOST = "httpbin.org" - HTTPBIN_PORT = 80 + HTTPBIN_PORT = 443 + HTTPBIN_SERVER = "https://{}:{}".format(HTTPBIN_HOST, HTTPBIN_PORT) FLASK_APP_PORT = 5000 -HTTPBIN_SERVER = "http://{}:{}".format(HTTPBIN_HOST, HTTPBIN_PORT) SECRET_KEY = "DebugTalk" app = Flask(__name__) diff --git a/tests/test_api.py b/tests/test_api.py index 929fc2a6..4de36228 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -5,7 +5,6 @@ import unittest from httprunner import loader, parser from httprunner.api import HttpRunner, prepare_locust_tests -from locust import HttpLocust from tests.api_server import HTTPBIN_SERVER from tests.base import ApiServerUnittest