Fix the wrong use of variable assertions in unit tests
When comparing variables, should use assertEqual Closed-Bug: #2002460 Change-Id: Iec2e9eec8fea6e5453704c22235fb860211af1a3
This commit is contained in:
parent
05505927a5
commit
eafcc2fc64
@ -97,7 +97,7 @@ class TestDeviceProfileController(v2_test.APITestV2):
|
||||
|
||||
result = isinstance(out_dps, list)
|
||||
self.assertTrue(result)
|
||||
self.assertTrue(len(out_dps), len(self.fake_dp_objs))
|
||||
self.assertEqual(len(out_dps), len(self.fake_dp_objs))
|
||||
for in_dp, out_dp in zip(self.fake_dp_objs, out_dps):
|
||||
self._validate_dp(in_dp, out_dp)
|
||||
|
||||
@ -112,7 +112,7 @@ class TestDeviceProfileController(v2_test.APITestV2):
|
||||
|
||||
result = isinstance(out_dps, list)
|
||||
self.assertTrue(result)
|
||||
self.assertTrue(len(out_dps), len(expected_dps))
|
||||
self.assertEqual(len(out_dps), len(expected_dps))
|
||||
for in_dp, out_dp in zip(expected_dps, out_dps):
|
||||
self._validate_dp(in_dp, out_dp)
|
||||
|
||||
|
@ -64,7 +64,7 @@ class TestDevicesController(v2_test.APITestV2):
|
||||
self.assertIsInstance(out_devices, list)
|
||||
for out_dev in out_devices:
|
||||
self.assertIsInstance(out_dev, dict)
|
||||
self.assertTrue(len(out_devices), len(self.fake_devices))
|
||||
self.assertEqual(len(out_devices), len(self.fake_devices))
|
||||
for in_device, out_device in zip(self.fake_devices, out_devices):
|
||||
self._validate_device(in_device, out_device)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user