X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftest_qp.py;fp=tests%2Ftest_qp.py;h=e4a061701bfd0d6989fbd08c8cc3dcf02a02d59c;hb=30a9743fdfd0ef62164c7ea74a4a120cb1c86852;hp=9473bc200ed9c306dce7c9648a956d35f3044669;hpb=48aa41171b8ca141df1f14341ea0ec2fde745af5;p=ric-app%2Fqp.git diff --git a/tests/test_qp.py b/tests/test_qp.py index 9473bc2..e4a0617 100644 --- a/tests/test_qp.py +++ b/tests/test_qp.py @@ -1,4 +1,5 @@ # ================================================================================== +# Copyright (c) 2020 HCL Technologies Limited. # Copyright (c) 2020 AT&T Intellectual Property. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +17,7 @@ import json import time from contextlib import suppress -from qp import main +from src import main from ricxappframe.xapp_frame import Xapp, RMRXapp mock_qp_xapp = None @@ -37,12 +38,20 @@ def test_init_xapp(monkeypatch): self.predict_requests = 0 # patch - monkeypatch.setattr("qp.main.post_init", fake_post_init) + monkeypatch.setattr("src.main.post_init", fake_post_init) # start qp main.start(thread=True) +def test_database_connection(monkeypatch): + main.connectdb(thread=True) + + +def test_training(monkeypatch, qp_train): + main.train_model(qp_train) + + def test_predict(monkeypatch, ts_to_qp): main.predict(ts_to_qp)