summaryrefslogtreecommitdiff
path: root/ceilometerclient/tests/unit/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ceilometerclient/tests/unit/test_utils.py')
-rw-r--r--ceilometerclient/tests/unit/test_utils.py65
1 files changed, 48 insertions, 17 deletions
diff --git a/ceilometerclient/tests/unit/test_utils.py b/ceilometerclient/tests/unit/test_utils.py
index a7e7584..5ef35e9 100644
--- a/ceilometerclient/tests/unit/test_utils.py
+++ b/ceilometerclient/tests/unit/test_utils.py
@@ -50,6 +50,14 @@ class UtilsTest(test_utils.BaseTestCase):
'type': 'threshold',
'threshold': '1.0',
'statistic': 'avg',
+ 'alarm_actions': [u'http://something/alarm1',
+ u'http://something/alarm2'],
+ 'ok_actions': [{"get_attr1":
+ [u"web_server_scaleup_policy1",
+ u"alarm_url1"]},
+ {"get_attr2":
+ [u"web_server_scaleup_policy2",
+ u"alarm_url2"]}],
'time_constraints': '[{name: c1,'
'\\n description: test,'
'\\n start: 0 18 * * *,'
@@ -57,23 +65,46 @@ class UtilsTest(test_utils.BaseTestCase):
'\\n timezone: US}]'},
wrap=72)
expected = u'''\
-+------------------+----------------------------------+
-| Property | Value |
-+------------------+----------------------------------+
-| alarm_id | 262567fd-d79a-4bbb-a9d0-59d879b6 |
-| description | \u6d4b\u8bd5 |
-| name | \u6d4b\u8bd5 |
-| repeat_actions | False |
-| state | insufficient data |
-| statistic | avg |
-| threshold | 1.0 |
-| time_constraints | [{name: c1, |
-| | description: test, |
-| | start: 0 18 * * *, |
-| | duration: 1, |
-| | timezone: US}] |
-| type | threshold |
-+------------------+----------------------------------+
++------------------+-------------------------------------------------------\
+--------+
+| Property | Value \
+ |
++------------------+-------------------------------------------------------\
+--------+
+| alarm_actions | ["http://something/alarm1", "http://something/alarm2"]\
+ |
+| alarm_id | 262567fd-d79a-4bbb-a9d0-59d879b6 \
+ |
+| description | \u6d4b\u8bd5 \
+ |
+| name | \u6d4b\u8bd5 \
+ |
+| ok_actions | [{"get_attr1": ["web_server_scaleup_policy1", "alarm_u\
+rl1"]}, |
+| | {"get_attr2": ["web_server_scaleup_policy2", "alarm_ur\
+l2"]}] |
+| repeat_actions | False \
+ |
+| state | insufficient data \
+ |
+| statistic | avg \
+ |
+| threshold | 1.0 \
+ |
+| time_constraints | [{name: c1, \
+ |
+| | description: test, \
+ |
+| | start: 0 18 * * *, \
+ |
+| | duration: 1, \
+ |
+| | timezone: US}] \
+ |
+| type | threshold \
+ |
++------------------+-------------------------------------------------------\
+--------+
'''
# py2 prints str type, py3 prints unicode type
if six.PY2: