mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 11:36:56 +08:00
Merge pull request #51 from firefoxwang/master
fix TypeError: can't pickle thread.lock objects
This commit is contained in:
+5
-1
@@ -7,6 +7,10 @@ from ate import utils
|
|||||||
from tests import api_server
|
from tests import api_server
|
||||||
|
|
||||||
|
|
||||||
|
def apprun():
|
||||||
|
api_server.app.run()
|
||||||
|
|
||||||
|
|
||||||
class ApiServerUnittest(unittest.TestCase):
|
class ApiServerUnittest(unittest.TestCase):
|
||||||
""" Test case class that sets up an HTTP server which can be used within the tests
|
""" Test case class that sets up an HTTP server which can be used within the tests
|
||||||
"""
|
"""
|
||||||
@@ -15,7 +19,7 @@ class ApiServerUnittest(unittest.TestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.host = "http://127.0.0.1:5000"
|
cls.host = "http://127.0.0.1:5000"
|
||||||
cls.api_server_process = multiprocessing.Process(
|
cls.api_server_process = multiprocessing.Process(
|
||||||
target=api_server.app.run
|
target=apprun
|
||||||
)
|
)
|
||||||
cls.api_server_process.start()
|
cls.api_server_process.start()
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|||||||
Reference in New Issue
Block a user