diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2024-02-02 18:49:01 +0100 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2024-02-02 19:13:47 +0100 |
commit | 8b63fb04e2f3923cfb096f4aae045349511835a6 (patch) | |
tree | 71a5a286289d4689d22b3f2e0c23c3d27de5ee57 /tests | |
parent | 9631f9d64a1f8c775b090dc109f5738b904a5d3d (diff) |
Fix SDC v2 lifecycleOperation bug
Relese 13.0.2 version with fix
Issue-ID: TEST-404
Change-Id: I076223ad3cb982fbf5035baa5254b1696f6408c7
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_sdc2_pnf.py | 6 | ||||
-rw-r--r-- | tests/test_sdc2_service.py | 6 | ||||
-rw-r--r-- | tests/test_sdc2_vf.py | 6 | ||||
-rw-r--r-- | tests/test_sdc2_vl.py | 6 | ||||
-rw-r--r-- | tests/test_version.py | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/test_sdc2_pnf.py b/tests/test_sdc2_pnf.py index 07834a5..01ba3fe 100644 --- a/tests/test_sdc2_pnf.py +++ b/tests/test_sdc2_pnf.py @@ -253,9 +253,9 @@ def test_lifecycle_operation(mock_update, mock_send_message_json): method, log, url = mock_send_message_json.mock_calls[0].args data = mock_send_message_json.mock_calls[0].kwargs["data"] assert method == "POST" - assert log.startswith(f"Request lifecycle operation {lifecycle_operation}") - assert url.endswith(f"sdc2/rest/v1/catalog/resources/{pnf_unique_id}/lifecycleState/{lifecycle_operation}") - assert json.loads(data)["userRemarks"] == str(lifecycle_operation).lower() + assert log.startswith(f"Request lifecycle operation {lifecycle_operation.value}") + assert url.endswith(f"sdc2/rest/v1/catalog/resources/{pnf_unique_id}/lifecycleState/{lifecycle_operation.value}") + assert json.loads(data)["userRemarks"] == str(lifecycle_operation.value).lower() mock_update.assert_called_once_with(return_dict) diff --git a/tests/test_sdc2_service.py b/tests/test_sdc2_service.py index 59e18b5..b189687 100644 --- a/tests/test_sdc2_service.py +++ b/tests/test_sdc2_service.py @@ -266,9 +266,9 @@ def test_lifecycle_operation(mock_update, mock_send_message_json): method, log, url = mock_send_message_json.mock_calls[0].args data = mock_send_message_json.mock_calls[0].kwargs["data"] assert method == "POST" - assert log.startswith(f"Request lifecycle operation {lifecycle_operation}") - assert url.endswith(f"sdc2/rest/v1/catalog/services/{service_unique_id}/lifecycleState/{lifecycle_operation}") - assert json.loads(data)["userRemarks"] == str(lifecycle_operation).lower() + assert log.startswith(f"Request lifecycle operation {lifecycle_operation.value}") + assert url.endswith(f"sdc2/rest/v1/catalog/services/{service_unique_id}/lifecycleState/{lifecycle_operation.value}") + assert json.loads(data)["userRemarks"] == str(lifecycle_operation.value).lower() mock_update.assert_called_once_with(return_dict) diff --git a/tests/test_sdc2_vf.py b/tests/test_sdc2_vf.py index a5657d5..a8ce472 100644 --- a/tests/test_sdc2_vf.py +++ b/tests/test_sdc2_vf.py @@ -253,9 +253,9 @@ def test_lifecycle_operation(mock_update, mock_send_message_json): method, log, url = mock_send_message_json.mock_calls[0].args data = mock_send_message_json.mock_calls[0].kwargs["data"] assert method == "POST" - assert log.startswith(f"Request lifecycle operation {lifecycle_operation}") - assert url.endswith(f"sdc2/rest/v1/catalog/resources/{vf_unique_id}/lifecycleState/{lifecycle_operation}") - assert json.loads(data)["userRemarks"] == str(lifecycle_operation).lower() + assert log.startswith(f"Request lifecycle operation {lifecycle_operation.value}") + assert url.endswith(f"sdc2/rest/v1/catalog/resources/{vf_unique_id}/lifecycleState/{lifecycle_operation.value}") + assert json.loads(data)["userRemarks"] == str(lifecycle_operation.value).lower() mock_update.assert_called_once_with(return_dict) diff --git a/tests/test_sdc2_vl.py b/tests/test_sdc2_vl.py index 8c7cd6b..b4e6788 100644 --- a/tests/test_sdc2_vl.py +++ b/tests/test_sdc2_vl.py @@ -250,9 +250,9 @@ def test_lifecycle_operation(mock_update, mock_send_message_json): method, log, url = mock_send_message_json.mock_calls[0].args data = mock_send_message_json.mock_calls[0].kwargs["data"] assert method == "POST" - assert log.startswith(f"Request lifecycle operation {lifecycle_operation}") - assert url.endswith(f"sdc2/rest/v1/catalog/resources/{vl_unique_id}/lifecycleState/{lifecycle_operation}") - assert json.loads(data)["userRemarks"] == str(lifecycle_operation).lower() + assert log.startswith(f"Request lifecycle operation {lifecycle_operation.value}") + assert url.endswith(f"sdc2/rest/v1/catalog/resources/{vl_unique_id}/lifecycleState/{lifecycle_operation.value}") + assert json.loads(data)["userRemarks"] == str(lifecycle_operation.value).lower() mock_update.assert_called_once_with(return_dict) diff --git a/tests/test_version.py b/tests/test_version.py index b3c9572..19299c1 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -17,4 +17,4 @@ import onapsdk.version as version def test_version(): """Check version is the right one.""" - assert version.__version__ == '13.0.1' + assert version.__version__ == '13.0.2' |