X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Ftests%2Funittest_setup.py;h=06567cfc240891257e8e929c2d76334d62cb053a;hb=refs%2Fchanges%2F47%2F11547%2F2;hp=9ffd009572430602bf6a0ffd5a3b9e3fc71bbacf;hpb=8f8c91b8e22e1941b61b916f149c9783841a4e7a;p=sim%2Fa1-interface.git diff --git a/near-rt-ric-simulator/tests/unittest_setup.py b/near-rt-ric-simulator/tests/unittest_setup.py index 9ffd009..06567cf 100644 --- 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+"/" -#Dir for json test data files +# Dir for json test data files testdata="" def setup_env(interface_version): @@ -51,9 +51,14 @@ def setup_env(interface_version): def get_testdata_dir(): return testdata -#Test client for rest calls +# Test client for rest calls @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=8085, host="127.0.0.1", threaded=True)