# Path: monasca_notification/notification.py
# class Notification(object):
#     def __init__(self, id, type, name, address, period, retry_count, alarm):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def to_json(self):
# 
# Path: monasca_notification/plugins/hipchat_notifier.py
# CONF = cfg.CONF
# SEVERITY_COLORS = {"low": 'green',
#                    'medium': 'gray',
#                    'high': 'yellow',
#                    'critical': 'red'}
# class HipChatNotifier(abstract_notifier.AbstractNotifier):
#     def __init__(self, log):
#     def config(self, config_dict=None):
#     def statsd_name(self):
#     def _build_hipchat_message(self, notification):
#     def _get_color(self, severity):
#     def send_notification(self, notification):
# def register_opts(conf):
# def list_opts():
# 
# Path: tests/base.py
# class DisableStatsdFixture(fixtures.Fixture):
# class ConfigFixture(oo_cfg.Config):
# class BaseTestCase(oslotest_base.BaseTestCase):
# class PluginTestCase(BaseTestCase):
#     def setUp(self):
#     def __init__(self):
#     def setUp(self):
#     def _clean_config_loaded_flag():
#     def setUp(self):
#     def conf_override(**kw):
#     def conf_default(**kw):
#     def setUp(self, register_opts=None):


import json
import queue
from unittest import mock
from monasca_notification import notification as m_notification
from monasca_notification.plugins import hipchat_notifier
from tests import base
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.




def alarm(metrics):
    return {"tenantId": "0",
            "alarmId": "0",
            "alarmDefinitionId": 0,
            "alarmName": "test Alarm",
            "alarmDescription": "test Alarm description",
            "oldState": "OK",
            "newState": "ALARM",
            "severity": "CRITICAL",
            "link": "some-link",
            "lifecycleState": "OPEN",

# Path: monasca_notification/notification.py
# class Notification(object):
#     def __init__(self, id, type, name, address, period, retry_count, alarm):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def to_json(self):
# 
# Path: monasca_notification/plugins/hipchat_notifier.py
# CONF = cfg.CONF
# SEVERITY_COLORS = {"low": 'green',
#                    'medium': 'gray',
#                    'high': 'yellow',
#                    'critical': 'red'}
# class HipChatNotifier(abstract_notifier.AbstractNotifier):
#     def __init__(self, log):
#     def config(self, config_dict=None):
#     def statsd_name(self):
#     def _build_hipchat_message(self, notification):
#     def _get_color(self, severity):
#     def send_notification(self, notification):
# def register_opts(conf):
# def list_opts():
# 
# Path: tests/base.py
# class DisableStatsdFixture(fixtures.Fixture):
# class ConfigFixture(oo_cfg.Config):
# class BaseTestCase(oslotest_base.BaseTestCase):
# class PluginTestCase(BaseTestCase):
#     def setUp(self):
#     def __init__(self):
#     def setUp(self):
#     def _clean_config_loaded_flag():
#     def setUp(self):
#     def conf_override(**kw):
#     def conf_default(**kw):
#     def setUp(self, register_opts=None):


# Path: tests/test_hipchat_notification.py
import json
import queue
from unittest import mock
from monasca_notification import notification as m_notification
from monasca_notification.plugins import hipchat_notifier
from tests import base

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.




def alarm(metrics):
    return {"tenantId": "0",
            "alarmId": "0",
            "alarmDefinitionId": 0,
            "alarmName": "test Alarm",
            "alarmDescription": "test Alarm description",
            "oldState": "OK",
            "newState": "ALARM",
            "severity": "CRITICAL",
            "link": "some-link",
            "lifecycleState": "OPEN",

            "stateChangeReason": "I am alarming!",