# 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
@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)
"name": "name",
"operation": "operation",
"uuid": "1",
+ "alarm_status": "ok",
+ "extra_labels": {},
},
)