bug 1092 fixing deletion of items referenced by several projects
It is only deletes if it the last project referencing it.
Depends on this change at common: https://osm.etsi.org/gerrit/9134
Change-Id: Id167c0ae3309212b97f59d47a9f3cee7f53fd263
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/osm_nbi/tests/test_instance_topics.py b/osm_nbi/tests/test_instance_topics.py
index 6d82b0f..14abde7 100644
--- a/osm_nbi/tests/test_instance_topics.py
+++ b/osm_nbi/tests/test_instance_topics.py
@@ -276,8 +276,9 @@
self.assertEqual(db_s1_args[0][0], self.nsr_topic.topic, "Wrong DB topic")
self.assertEqual(db_s1_args[0][1]["_id"], self.nsr_id, "Wrong DB ID")
self.assertIsNone(db_s1_args[1]["update_dict"], "Wrong DB update dictionary")
- self.assertIn("_admin.projects_read." + p_other, db_s1_args[1]["pull"], "Wrong DB pull dictionary")
- self.assertIn("_admin.projects_write." + p_other, db_s1_args[1]["pull"], "Wrong DB pull dictionary")
+ self.assertEqual(db_s1_args[1]["pull_list"],
+ {"_admin.projects_read": [p_other], "_admin.projects_write": [p_other]},
+ "Wrong DB pull_list dictionary")
self.fs.file_delete.assert_not_called()
with self.subTest(i=4, t='Delete with force and admin'):
self.db.del_one.reset_mock()