X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftest_controller.py;h=2aac5a98e164edee74c89ca654ce044b09b2ed4e;hb=2c1c4e9dd207289bbdc3453bfdb3e2dad68df8a8;hp=bbfe9969ccf9a13f74059ff125ef0062dd7f86b1;hpb=0e3bc64f93a316e49bbdeb047e7592840207231d;p=ric-plt%2Fa1.git diff --git a/tests/test_controller.py b/tests/test_controller.py index bbfe996..2aac5a9 100644 --- a/tests/test_controller.py +++ b/tests/test_controller.py @@ -19,8 +19,8 @@ tests for controller # ================================================================================== import time import json -from rmr.rmr_mocks import rmr_mocks -from ricsdl.syncstorage import SyncStorage +from ricxappframe.rmr.rmr_mocks import rmr_mocks +from ricxappframe.xapp_sdl import SDLWrapper from ricsdl.exceptions import RejectedByBackend, NotConnected, BackendError from a1 import a1rmr, data @@ -89,7 +89,7 @@ def _fake_dequeue_deleted(): def _test_put_patch(monkeypatch): rmr_mocks.patch_rmr(monkeypatch) # assert that rmr bad states don't cause problems - monkeypatch.setattr("rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(10)) + monkeypatch.setattr("ricxappframe.rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(10)) def _no_ac(client): @@ -232,7 +232,8 @@ def _verify_instance_and_status(client, expected_instance, expected_status, expe def setup_module(): """module level setup""" - data.SDL.sdl = SyncStorage(fake_db_backend="dict") + # swap sdl for the fake backend + data.SDL = SDLWrapper(use_fake_sdl=True) def noop(): pass @@ -351,7 +352,7 @@ def test_bad_instances(client, monkeypatch, adm_type_good): # test 503 handlers - def monkey_set(key, value): + def monkey_set(ns, key, value): # set a key override function that throws sdl errors on certain keys if key == "a1.policy_type.111": raise RejectedByBackend()