# 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):


import json
from monasca_notification import notification
                     u'message': u'stateChangeReason',
                     u'period': 60,
                     u'retry_count': 0,
                     u'raw_alarm': {
                         u'alarmId': u'alarmId',
                         u'alarmName': u'alarmName',
                         u'timestamp': ts,
                         u'stateChangeReason': u'stateChangeReason',
                         u'newState': u'newState',
                         u'severity': u'LOW',
                         u'link': u'some-link',
                         u'lifecycleState': u'OPEN',
                         u'tenantId': u'tenantId',
                         u'metrics': u'cpu_util'}}

    # Compare as dicts so ordering is not an issue
    assert json.loads(test_notification.to_json()) == expected_dict


def test_equal():
    alarm = {'alarmId': 'alarmId',
             'alarmName': 'alarmName',
             'timestamp': 1429029121239,
             'stateChangeReason': 'stateChangeReason',
             'newState': 'newState',
             'severity': 'LOW',
             "link": "some-link",
             "lifecycleState": "OPEN",
             'tenantId': 'tenantId',
             'metrics': 'cpu_util'}

# 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: tests/test_notification.py
import json
from monasca_notification import notification

                     u'message': u'stateChangeReason',
                     u'period': 60,
                     u'retry_count': 0,
                     u'raw_alarm': {
                         u'alarmId': u'alarmId',
                         u'alarmName': u'alarmName',
                         u'timestamp': ts,
                         u'stateChangeReason': u'stateChangeReason',
                         u'newState': u'newState',
                         u'severity': u'LOW',
                         u'link': u'some-link',
                         u'lifecycleState': u'OPEN',
                         u'tenantId': u'tenantId',
                         u'metrics': u'cpu_util'}}

    # Compare as dicts so ordering is not an issue
    assert json.loads(test_notification.to_json()) == expected_dict


def test_equal():
    alarm = {'alarmId': 'alarmId',
             'alarmName': 'alarmName',
             'timestamp': 1429029121239,
             'stateChangeReason': 'stateChangeReason',
             'newState': 'newState',
             'severity': 'LOW',
             "link": "some-link",
             "lifecycleState": "OPEN",
             'tenantId': 'tenantId',
             'metrics': 'cpu_util'}

    test_notification = notification.Notification(0, 'ntype', 'name',