X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftesting_helpers.py;h=c59426b5cffe06d5bf223f1baef19e26b87731e9;hb=bb5ad70e6a48771e7ace7874bf6c9fa7df49100f;hp=b258a85d69d086ccbc6c36229e99f935ae36f36f;hpb=24514469850dc9a543869f132385633039c5f5a6;p=ric-plt%2Fa1.git diff --git a/tests/testing_helpers.py b/tests/testing_helpers.py index b258a85..c59426b 100644 --- a/tests/testing_helpers.py +++ b/tests/testing_helpers.py @@ -24,18 +24,18 @@ def _get_fixture_path(name): return "{0}/fixtures/{1}".format(cur_dir, name) -def patch_all(monkeypatch, nonexisting_rmr=False): +def patch_all(monkeypatch, nonexisting_rmr=False, nofetch=False): rmr_mocks.patch_rmr(monkeypatch) # patch manifest man = json.loads(open(_get_fixture_path("ricmanifest.json"), "r").read()) if nonexisting_rmr: man["controls"][0]["message_receives_rmr_type"] = "DARKNESS" - monkeypatch.setattr("a1.utils.get_ric_manifest", lambda: man) - # patch rmr mapping - mapping = open(_get_fixture_path("rmr_string_int_mapping.txt"), "r").readlines() - monkeypatch.setattr("a1.utils._get_rmr_mapping_table", lambda: mapping) + if nofetch: + del man["controls"][0]["control_state_request_rmr_type"] + + monkeypatch.setattr("a1.utils.get_ric_manifest", lambda: man) def good_payload():