Change name of 'state' attribute of 'FakeAlarm' CloudWatch model to 'state_value'. This ensures that the 'StateValue' returned by 'describe_alarms' is correct.
The 'DESCRIBE_ALARMS_TEMPLATE' response template references a 'state_value' attribute on the 'FakeAlarm' model which does not exist; it is named 'state'. This commit updates the attribute to be called 'state_value', in-line with the naming convention used elsewhere.
This commit is contained in:
parent
56ce26a728
commit
a8cd5fb7fd
2 changed files with 6 additions and 4 deletions
|
|
@ -127,12 +127,14 @@ def test_alarm_state():
|
|||
)
|
||||
len(resp['MetricAlarms']).should.equal(1)
|
||||
resp['MetricAlarms'][0]['AlarmName'].should.equal('testalarm1')
|
||||
resp['MetricAlarms'][0]['StateValue'].should.equal('ALARM')
|
||||
|
||||
resp = client.describe_alarms(
|
||||
StateValue='OK'
|
||||
)
|
||||
len(resp['MetricAlarms']).should.equal(1)
|
||||
resp['MetricAlarms'][0]['AlarmName'].should.equal('testalarm2')
|
||||
resp['MetricAlarms'][0]['StateValue'].should.equal('OK')
|
||||
|
||||
# Just for sanity
|
||||
resp = client.describe_alarms()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue