X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=smo-install%2Ftest%2Fpythonsdk%2Funit-tests%2Ftest_sdnc.py;h=80e672ed1e5c2544afaa5abfa2d82888a0626c0e;hb=7b4b4007db003d28ee347e3d373e8ac605581cb5;hp=9a6c6d27f9986ca10c276b29092de25186e2be2f;hpb=a8414e7e44dea72da6f4f235e14f7fef59b4e266;p=it%2Fdep.git diff --git a/smo-install/test/pythonsdk/unit-tests/test_sdnc.py b/smo-install/test/pythonsdk/unit-tests/test_sdnc.py index 9a6c6d27..80e672ed 100644 --- a/smo-install/test/pythonsdk/unit-tests/test_sdnc.py +++ b/smo-install/test/pythonsdk/unit-tests/test_sdnc.py @@ -25,12 +25,10 @@ def test_get_status(mock_send_message): @mock.patch.object(OranSdnc, 'send_message_json') def test_get_odu_oru_status(mock_send_message_json): """Test Sdnc's class method.""" - OranSdnc.get_odu_oru_status("o-du", "o-ru", BASIC_AUTH) + OranSdnc.get_odu_oru_status("o-du", "radio21", BASIC_AUTH) mock_send_message_json.assert_called_once_with('GET', - 'Get status of Odu Oru connectivity', - (f"{BASE_URL}/rests/data/network-topology:network-topology/"\ - + "topology=topology-netconf/node=o-du/yang-ext:mount/"\ - + "o-ran-sc-du-hello-world:network-function/du-to-ru-connection=o-ru"), + 'Get status of Odu connectivity', + (f"{BASE_URL}/rests/data/network-topology:network-topology/topology=topology-netconf/node=o-du/yang-ext:mount/o-ran-sc-du-hello-world:network-function/distributed-unit-functions=o-du/radio-resource-management-policy-ratio=radio21"), basic_auth=BASIC_AUTH) @mock.patch.object(OranSdnc, 'send_message') def test_get_devices(mock_send_message): @@ -42,6 +40,6 @@ def test_get_devices(mock_send_message): def test_get_events(mock_send_message): """Test Sdnc's class method.""" OranSdnc.get_events(BASIC_AUTH, "device") - data = '{"input": {"filter": [ {"property": "node-id", "filtervalue": " device "}],"sortorder":[{"property": "timestamp","sortorder": "descending"}],"pagination": {"size": 10,"page": 1}}}' + data = '{"input": {"filter": [ {"property": "node-id", "filtervalue": "device"}],"sortorder":[{"property": "timestamp","sortorder": "descending"}],"pagination": {"size": 10,"page": 1}}}' mock_send_message.assert_called_with('POST', 'Get SDNC events', (f"{BASE_URL}/rests/operations/data-provider:read-faultlog-list"), data=data, headers=HEADER, basic_auth=BASIC_AUTH)