# 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
# 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.

"""Tests the notification class."""



def test_json():
    """Test the to_json method to verify it behaves as expected.
    """
    ts = 1429029121239
    alarm = {'alarmId': 'alarmId',
             'alarmName': 'alarmName',
             'timestamp': ts,
             '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

# 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.

"""Tests the notification class."""



def test_json():
    """Test the to_json method to verify it behaves as expected.
    """
    ts = 1429029121239
    alarm = {'alarmId': 'alarmId',
             'alarmName': 'alarmName',
             'timestamp': ts,
             'stateChangeReason': 'stateChangeReason',
             'newState': 'newState',
             'severity': 'LOW',
             "link": "some-link",
             "lifecycleState": "OPEN",
             'tenantId': 'tenantId',
             'metrics': 'cpu_util'}

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