From 52fa69cc5afcfef5d6b03b17f23d500668c0c0a1 Mon Sep 17 00:00:00 2001 From: firefoxwang <1228137800@qq.com> Date: Tue, 24 Oct 2017 15:16:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/base.py b/tests/base.py index 947c4663..faa15ef0 100644 --- a/tests/base.py +++ b/tests/base.py @@ -6,6 +6,8 @@ import requests from ate import utils from tests import api_server +def apprun(): + _ = api_server.app.run() class ApiServerUnittest(unittest.TestCase): """ Test case class that sets up an HTTP server which can be used within the tests @@ -15,7 +17,7 @@ class ApiServerUnittest(unittest.TestCase): def setUpClass(cls): cls.host = "http://127.0.0.1:5000" cls.api_server_process = multiprocessing.Process( - target=api_server.app.run + target=apprun ) cls.api_server_process.start() time.sleep(0.1) From 249cff7ff8e393b60fc2531ce6df29cc149695af Mon Sep 17 00:00:00 2001 From: firefoxwang <1228137800@qq.com> Date: Wed, 1 Nov 2017 20:25:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bugfix:Presentation=20file=EF=BC=88base.py?= =?UTF-8?q?=EF=BC=89=20multiprocessing=20problem=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/base.py b/tests/base.py index faa15ef0..aa9d1b70 100644 --- a/tests/base.py +++ b/tests/base.py @@ -6,8 +6,10 @@ import requests from ate import utils from tests import api_server + def apprun(): - _ = api_server.app.run() + api_server.app.run() + class ApiServerUnittest(unittest.TestCase): """ Test case class that sets up an HTTP server which can be used within the tests