X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Ftests%2Funit%2Fcore%2Ftest_common_db_client.py;h=7f0768df3e77864d90994d27e9cc78ffe317d379;hb=b3173221c25ae915eaca041ebd045f6148cc447d;hp=b639b7a75b5d9bf0960ccf6ba6a62d964b8df806;hpb=8e4179facf22c8096992f0a83caeec9f2f4996c7;p=osm%2FMON.git diff --git a/osm_mon/tests/unit/core/test_common_db_client.py b/osm_mon/tests/unit/core/test_common_db_client.py index b639b7a..7f0768d 100644 --- a/osm_mon/tests/unit/core/test_common_db_client.py +++ b/osm_mon/tests/unit/core/test_common_db_client.py @@ -20,6 +20,7 @@ # For those usages not covered by the Apache License, Version 2.0 please # contact: bdiaz@whitestack.com or glavado@whitestack.com ## + import unittest from unittest import mock @@ -185,7 +186,17 @@ class CommonDbClientTest(unittest.TestCase): @mock.patch.object(dbmongo.DbMongo, "db_connect", mock.Mock()) @mock.patch.object(dbmongo.DbMongo, "create") def test_create_alarm(self, create): - alarm = Alarm("name", "severity", 50.0, "operation", "statistic", "metric", {}) + alarm = Alarm( + "name", + "severity", + 50.0, + "operation", + "statistic", + "metric", + "scale_out", + {}, + "ok", + ) alarm.uuid = "1" common_db_client = CommonDbClient(self.config) common_db_client.create_alarm(alarm) @@ -200,6 +211,8 @@ class CommonDbClientTest(unittest.TestCase): "name": "name", "operation": "operation", "uuid": "1", + "alarm_status": "ok", + "extra_labels": {}, }, )