# ==================================================================================
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
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):
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
# 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()