X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftesting_helpers.py;fp=tests%2Ftesting_helpers.py;h=2c9dda2d6e76db9b3452c3f071e9ee389b5c872c;hb=fdf050451414e1a816e343bcd56f33186a742e49;hp=b258a85d69d086ccbc6c36229e99f935ae36f36f;hpb=24514469850dc9a543869f132385633039c5f5a6;p=ric-plt%2Fa1.git diff --git a/tests/testing_helpers.py b/tests/testing_helpers.py index b258a85..2c9dda2 100644 --- a/tests/testing_helpers.py +++ b/tests/testing_helpers.py @@ -24,13 +24,17 @@ 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" + + if nofetch: + del man["controls"][0]["control_state_request_rmr_type"] + monkeypatch.setattr("a1.utils.get_ric_manifest", lambda: man) # patch rmr mapping