Fix bug 1412: Generate kdu instance from LCM
[osm/LCM.git] / osm_lcm / tests / test_ns.py
index 6a609dc..c0dda15 100644 (file)
@@ -532,7 +532,9 @@ class TestMyNS(asynctest.TestCase):
         db_vnfds = [db_vnfd]
         task_register = {}
         logging_text = "KDU"
-        self.my_ns.k8sclusterhelm3.install = asynctest.CoroutineMock(return_value="k8s_id")
+        self.my_ns.k8sclusterhelm3.generate_kdu_instance_name = asynctest.mock.Mock()
+        self.my_ns.k8sclusterhelm3.generate_kdu_instance_name.return_value = "k8s_id"
+        self.my_ns.k8sclusterhelm3.install = asynctest.CoroutineMock()
         self.my_ns.k8sclusterhelm3.synchronize_repos = asynctest.CoroutineMock(return_value=("", ""))
         self.my_ns.k8sclusterhelm3.get_services = asynctest.CoroutineMock(return_value=([]))
         await self.my_ns.deploy_kdus(logging_text, nsr_id, nslcmop_id, db_vnfrs, db_vnfds, task_register)