From 05505927a5aa243870d01c477acc0da9df0adf70 Mon Sep 17 00:00:00 2001 From: zhangtongjian Date: Wed, 11 Jan 2023 18:49:12 +0800 Subject: [PATCH] When asserting the number of members obtained in unit test deployables, should use assertEqual Related-Bug: #2002460 Change-Id: I2a5bf79b2eb0355edbc07e54cbb51c87f860e97d --- cyborg/tests/unit/api/controllers/v2/test_deployables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyborg/tests/unit/api/controllers/v2/test_deployables.py b/cyborg/tests/unit/api/controllers/v2/test_deployables.py index 7d6f4d2e..cba66d38 100644 --- a/cyborg/tests/unit/api/controllers/v2/test_deployables.py +++ b/cyborg/tests/unit/api/controllers/v2/test_deployables.py @@ -65,7 +65,7 @@ class TestDeployablesController(v2_test.APITestV2): self.assertIsInstance(out_deployable, list) for out_dev in out_deployable: self.assertIsInstance(out_dev, dict) - self.assertTrue(len(out_deployable), 1) + self.assertEqual(len(out_deployable), 1) self._validate_deployable(self.fake_deployable, out_deployable[0]) @mock.patch('cyborg.objects.Deployable.list')