Change test_post_alarm case in test_alarm_scenarios
It is not reasonable to assert that the new added object will be the last one when call get_alarms, especially after default sort direction is added. Change-Id: Icd81aca5cd15e5ec34f081fe29fbad49dcccc45c
This commit is contained in:
parent
de22ede604
commit
9fe6b6eeae
@ -123,7 +123,12 @@ class TestAlarms(FunctionalTest,
|
|||||||
headers=self.auth_headers)
|
headers=self.auth_headers)
|
||||||
alarms = list(self.conn.get_alarms())
|
alarms = list(self.conn.get_alarms())
|
||||||
self.assertEquals(4, len(alarms))
|
self.assertEquals(4, len(alarms))
|
||||||
self.assertEquals(alarms[3].repeat_actions, True)
|
for alarm in alarms:
|
||||||
|
if alarm.name == 'added_alarm':
|
||||||
|
self.assertEqual(alarm.repeat_actions, True)
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
self.fail("Alarm not found")
|
||||||
|
|
||||||
def test_put_alarm(self):
|
def test_put_alarm(self):
|
||||||
json = {
|
json = {
|
||||||
|
Loading…
Reference in New Issue
Block a user