aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_cps.py
diff options
context:
space:
mode:
authorArne Chrestin <arne.chrestin@telekom.de>2023-10-02 18:19:58 +0200
committerArne Chrestin <arne.chrestin@telekom.de>2023-10-16 12:16:50 +0200
commit4e3e660024cfea7e145d79fabf3233d8895329f8 (patch)
tree3b96008190aae96dc3ccde1bffdb1c3f1030df82 /tests/test_cps.py
parent7f61bdf95398b461581a2b0aec043faa24c94ee2 (diff)
Add delete-anchor method for cps
Issue-ID: TEST-408 Signed-off-by: Arne Chrestin <arne.chrestin@telekom.de> Change-Id: I6ad9c25dbe9b45fdaf357d0a540332089be5a6a6
Diffstat (limited to 'tests/test_cps.py')
-rw-r--r--tests/test_cps.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_cps.py b/tests/test_cps.py
index a62b53f..be9ed12 100644
--- a/tests/test_cps.py
+++ b/tests/test_cps.py
@@ -89,6 +89,15 @@ def test_dataspace_get_anchor(mock_send_message_json):
assert anchor.schema_set.name == "schemaSet1"
assert anchor.schema_set.dataspace == ds
+@mock.patch("onapsdk.cps.Dataspace.send_message")
+def test_dataspace_delete_anchor(mock_send_message):
+ ds = Dataspace(name="test_ds")
+ ds.delete_anchor("some-anchor")
+ mock_send_message.assert_called_once()
+ args = mock_send_message.call_args
+ assert args[0][0] == "DELETE"
+ assert args[0][2].split('/')[-1] == "some-anchor"
+
@mock.patch("onapsdk.cps.Dataspace.send_message_json")
def test_dataspace_get_schema_set(mock_send_message_json):
mock_send_message_json.return_value = DATASPACE_SCHEMA_SET