Code Review
/
sim
/
a1-interface.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Release notes & Roll version after i-release 2.6.0 -> 2.7.0
[sim/a1-interface.git]
/
near-rt-ric-simulator
/
tests
/
unittest_setup.py
diff --git
a/near-rt-ric-simulator/tests/unittest_setup.py
b/near-rt-ric-simulator/tests/unittest_setup.py
index
9ffd009
..
e30b1ad
100644
(file)
--- a/
near-rt-ric-simulator/tests/unittest_setup.py
+++ b/
near-rt-ric-simulator/tests/unittest_setup.py
@@
-25,7
+25,7
@@
PORT_NUMBER="2222"
HOST_IP="localhost"
SERVER_URL="http://"+HOST_IP+":"+PORT_NUMBER+"/"
HOST_IP="localhost"
SERVER_URL="http://"+HOST_IP+":"+PORT_NUMBER+"/"
-#Dir for json test data files
+#
Dir for json test data files
testdata=""
def setup_env(interface_version):
testdata=""
def setup_env(interface_version):
@@
-51,9
+51,14
@@
def setup_env(interface_version):
def get_testdata_dir():
return testdata
def get_testdata_dir():
return testdata
-#Test client for rest calls
+#
Test client for rest calls
@pytest.fixture
def client():
from main import app
@pytest.fixture
def client():
from main import app
- with app.app.test_client() as c:
- yield c
\ No newline at end of file
+ with app.app.test_client() as client:
+ yield client
+
+# Run the Flask app in a separate thread for testing
+def run_flask_app():
+ from main import app
+ app.app.run(port=8086, host="127.0.0.1")