import uuid
from unittest.mock import patch, Mock
-from kafka import KafkaProducer
+from aiokafka import AIOKafkaProducer
from osm_common.dbmongo import DbMongo
from playhouse.db_url import connect
os.remove("test_db.sqlite")
@patch.object(DbMongo, "db_connect", Mock())
- @patch.object(KafkaProducer, "__init__")
+ @patch.object(AIOKafkaProducer, "__init__")
@patch.object(MonClient, "create_alarm")
@patch.object(CommonDbClient, "get_vnfd")
@patch.object(CommonDbClient, "get_nsr")
self.assertEqual(scaling_record.nsr_id, "test_nsr_id")
@patch.object(DbMongo, "db_connect", Mock())
- @patch.object(KafkaProducer, "__init__")
+ @patch.object(AIOKafkaProducer, "__init__")
@patch.object(MonClient, "create_alarm")
@patch.object(CommonDbClient, "get_vnfd")
@patch.object(CommonDbClient, "get_nsr")
)
@patch.object(DbMongo, "db_connect", Mock())
- @patch.object(KafkaProducer, "__init__")
+ @patch.object(AIOKafkaProducer, "__init__")
@patch.object(MonClient, "create_alarm")
@patch.object(CommonDbClient, "get_vnfd")
@patch.object(CommonDbClient, "get_nsr")