Replace assertEqual([], items) with assertEmpty(items)

Since assertEmpty() function has already been implemented in tempest,
let's use this function instead of generic assertEqual() function.
This change makes the code and the error messages to be more readable.
Therefore it improves maintainability a little bit.

Change-Id: I451d5f091f2103dd838da28afca7f3b9fe955d89
This commit is contained in:
Vu Cong Tuan 2017-06-13 10:02:47 +07:00
parent d894d20099
commit 6f213c3927
1 changed files with 1 additions and 1 deletions

View File

@ -1088,7 +1088,7 @@ class TestAlarmDefinitions(base.BaseMonascaTest):
self.assertEqual(alarm_definition['match_by'],
response_body['match_by'])
else:
self.assertEqual([], response_body['match_by'])
self.assertEmpty(response_body['match_by'])
if 'severity' in alarm_definition:
self.assertEqual(alarm_definition['severity'],
str(response_body['severity']))