X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Ftests%2Funit%2Fnetwork_services%2Ftraffic_profile%2Ftest_rfc2544.py;h=b8fbc634475fcd58d1f40a6052fe175d599538a2;hb=11b0b1e3cfcc4b09008c33903d4bf70eb96beba7;hp=4c546d7efc66a4bbc880263190152d770fbbfa1c;hpb=b0c8585051a523011bbf5afe7413fd8f65d01412;p=yardstick.git diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py b/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py index 4c546d7ef..b8fbc6344 100644 --- a/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py +++ b/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py @@ -164,8 +164,10 @@ class TestRFC2544Profile(base.BaseUnitTestCase): data = {'64B': 25, '128B': 25, '512B': 25, '1518B': 25} byte_total = 64 * 25 + 128 * 25 + 512 * 25 + 1518 * 25 self.assertEqual( - {'64': 64 * 25.0 / byte_total, '128': 128 * 25.0 / byte_total, - '512': 512 * 25.0 / byte_total, '1518': 1518 * 25.0 / byte_total}, + {'64': 64 * 25.0 * 100 / byte_total, + '128': 128 * 25.0 * 100 / byte_total, + '512': 512 * 25.0 * 100 / byte_total, + '1518': 1518 * 25.0 * 100/ byte_total}, rfc2544_profile._create_imix_data( data, weight_mode=constants.DISTRIBUTION_IN_PACKETS)) data = {} @@ -173,6 +175,11 @@ class TestRFC2544Profile(base.BaseUnitTestCase): {}, rfc2544_profile._create_imix_data( data, weight_mode=constants.DISTRIBUTION_IN_PACKETS)) + data = {'64B': 100} + self.assertEqual( + {'64': 100.0}, + rfc2544_profile._create_imix_data( + data, weight_mode=constants.DISTRIBUTION_IN_PACKETS)) def test__create_vm(self): packet = {'outer_l2': 'l2_definition'}