From 9fd6661f0480ee94c742611ce9c478e30ca5e416 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Mon, 9 Jul 2018 12:06:55 +0100 Subject: Fix IXIA IxNetwork IMIX configuration IxNet library is not setting correctly the IMIX definition per traffic item. The correct input for "weightedRangePairs" parameter is: [[64, 64, 10], [128, 128, 15], [512, 512, 5]] JIRA: YARDSTICK-1296 Change-Id: Idb4034ce817250da5b9a434230b1be6dae0d3ba3 Signed-off-by: Rodolfo Alonso Hernandez --- .../unit/network_services/libs/ixia_libs/test_ixnet_api.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py') diff --git a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py index 34afa3d5b..541855aa8 100644 --- a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py +++ b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py @@ -203,13 +203,9 @@ class TestIxNextgen(unittest.TestCase): ixnet_gen._ixnet = self.ixnet framesize = {'64B': '75', '512b': '25'} output = ixnet_gen._parse_framesize(framesize) - for idx in range(len(framesize)): - if output[idx * 2] == 64: - self.assertEqual(75, output[idx * 2 + 1]) - elif output[idx * 2] == 512: - self.assertEqual(25, output[idx * 2 + 1]) - else: - raise self.failureException('Framesize (64, 512) not present') + self.assertEqual(2, len(output)) + self.assertIn([64, 64, 75], output) + self.assertIn([512, 512, 25], output) @mock.patch.object(IxNetwork, 'IxNet') def test_connect(self, mock_ixnet): -- cgit 1.2.3-korg