X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftest_ad.py;h=cb0a73a18c3277873f51ca4bc593c09621847424;hb=refs%2Fheads%2Fh-release;hp=70de7dde2da41d88be227e52ef80493227c01622;hpb=91624d7cb4a7283e76fd591f38b1967c4914a5eb;p=ric-app%2Fad.git diff --git a/tests/test_ad.py b/tests/test_ad.py index 70de7dd..cb0a73a 100644 --- a/tests/test_ad.py +++ b/tests/test_ad.py @@ -13,25 +13,23 @@ # See the License for the specific language governing permissions and # limitations under the License. # ================================================================================== -from ad import main +import json +from src import main from ricxappframe.xapp_frame import Xapp from contextlib import suppress -import os -from ad.ad_train import train -import json def test_database_connection(monkeypatch): - # start qp + # start ad main.connectdb(thread=True) def test_trainModel(monkeypatch): - if not os.path.isfile('model'): - train(thread=True) + main.train_model() def test_predict_anomaly(monkeypatch, ad_ue): + main.load_model() main.predict_anomaly(monkeypatch, ad_ue)