Fix argument order in assertEqual to (expect, obs)
assertEqual expects that the arguments provided to it should be (expected, observed). If a particular order is kept as a convention, then it helps to provide a cleaner message to the developer if Unit Tests fail. There are several Unit Test files where the arguments for assertEqual have been swapped. Closes-Bug: #1259292 Change-Id: I17930c8ba8168baba9baddbdb7a54d54497f6a6d
This commit is contained in:
parent
23a5d63a22
commit
6b97b9a7cd
|
@ -38,12 +38,12 @@ class MagnumServiceTest(base.BaseMagnumTest):
|
|||
# get json object
|
||||
client = cli.MagnumServiceClient.as_user('admin')
|
||||
resp, msvcs = client.magnum_service_list()
|
||||
self.assertEqual(resp.status, 200)
|
||||
self.assertEqual(200, resp.status)
|
||||
# Note(suro-patz): Following code assumes that we have only
|
||||
# one service, magnum-conductor enabled, as of now.
|
||||
self.assertEqual(len(msvcs.mservices), 1)
|
||||
self.assertEqual(1, len(msvcs.mservices))
|
||||
mcond_svc = msvcs.mservices[0]
|
||||
self.assertEqual(mcond_svc['id'], 1)
|
||||
self.assertEqual(mcond_svc['state'], 'up')
|
||||
self.assertEqual(mcond_svc['binary'], 'magnum-conductor')
|
||||
self.assertEqual('up', mcond_svc['state'])
|
||||
self.assertEqual('magnum-conductor', mcond_svc['binary'])
|
||||
self.assertGreater(mcond_svc['report_count'], 0)
|
||||
|
|
Loading…
Reference in New Issue