Merge "Change test case get_alarm_history_on_create"
This commit is contained in:
commit
92d21bd672
@ -1024,7 +1024,14 @@ class TestAlarms(FunctionalTest,
|
|||||||
}
|
}
|
||||||
self.post_json('/alarms', params=new_alarm, status=201,
|
self.post_json('/alarms', params=new_alarm, status=201,
|
||||||
headers=self.auth_headers)
|
headers=self.auth_headers)
|
||||||
alarm = self.get_json('/alarms')[4]
|
|
||||||
|
alarms = self.get_json('/alarms',
|
||||||
|
q=[{'field': 'name',
|
||||||
|
'value': 'new_alarm',
|
||||||
|
}])
|
||||||
|
self.assertEqual(1, len(alarms))
|
||||||
|
alarm = alarms[0]
|
||||||
|
|
||||||
history = self._get_alarm_history(alarm)
|
history = self._get_alarm_history(alarm)
|
||||||
self.assertEqual(1, len(history))
|
self.assertEqual(1, len(history))
|
||||||
self._assert_is_subset(dict(alarm_id=alarm['alarm_id'],
|
self._assert_is_subset(dict(alarm_id=alarm['alarm_id'],
|
||||||
|
Loading…
Reference in New Issue
Block a user