aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/networking/test_pktgen.py
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2018-01-26 21:12:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-26 21:12:01 +0000
commite6b6f6fca60322f57329d1c93a01c88c3c81b62c (patch)
tree4bceaafce8756246a9e2b46d5ddb791144b3462b /tests/unit/benchmark/scenarios/networking/test_pktgen.py
parent868db57177cdbbebf8d160ca049cdf81fda3a2f4 (diff)
parent298e2e529e815f31c7ae5e0e1154a7fdac92a067 (diff)
Merge changes from topic 'bug/yardstick-864'
* changes: Replace assertEquals with assertEqual Make files pep8 compliant before using assertTrue|False
Diffstat (limited to 'tests/unit/benchmark/scenarios/networking/test_pktgen.py')
-rw-r--r--tests/unit/benchmark/scenarios/networking/test_pktgen.py34
1 files changed, 24 insertions, 10 deletions
diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen.py b/tests/unit/benchmark/scenarios/networking/test_pktgen.py
index 3928aacde..71d20e5fe 100644
--- a/tests/unit/benchmark/scenarios/networking/test_pktgen.py
+++ b/tests/unit/benchmark/scenarios/networking/test_pktgen.py
@@ -632,9 +632,13 @@ class PktgenTestCase(unittest.TestCase):
def test_pktgen_run_with_setup_done(self, mock_ssh):
args = {
- 'options': {'packetsize': 60, 'number_of_ports': 10, 'duration': 20, 'multiqueue': True},
- 'sla': {'max_ppm': 1}
- }
+ 'options': {
+ 'packetsize': 60,
+ 'number_of_ports': 10,
+ 'duration': 20,
+ 'multiqueue': True},
+ 'sla': {
+ 'max_ppm': 1}}
result = {}
p = pktgen.Pktgen(args, self.ctx)
p.server = mock_ssh.SSH.from_node()
@@ -659,9 +663,13 @@ class PktgenTestCase(unittest.TestCase):
def test_pktgen_run_with_ovs_multiqueque(self, mock_ssh):
args = {
- 'options': {'packetsize': 60, 'number_of_ports': 10, 'duration': 20, 'multiqueue': True},
- 'sla': {'max_ppm': 1}
- }
+ 'options': {
+ 'packetsize': 60,
+ 'number_of_ports': 10,
+ 'duration': 20,
+ 'multiqueue': True},
+ 'sla': {
+ 'max_ppm': 1}}
result = {}
p = pktgen.Pktgen(args, self.ctx)
@@ -683,7 +691,7 @@ class PktgenTestCase(unittest.TestCase):
mock_result3 = mock.Mock()
mock_result3.return_value = 4
- p._enable_ovs_multiqueue = mock_result3
+ p._enable_ovs_multiqueue = mock_result3
mock_result4 = mock.Mock()
p._setup_irqmapping_ovs = mock_result4
@@ -704,9 +712,13 @@ class PktgenTestCase(unittest.TestCase):
def test_pktgen_run_with_sriov_multiqueque(self, mock_ssh):
args = {
- 'options': {'packetsize': 60, 'number_of_ports': 10, 'duration': 20, 'multiqueue': True},
- 'sla': {'max_ppm': 1}
- }
+ 'options': {
+ 'packetsize': 60,
+ 'number_of_ports': 10,
+ 'duration': 20,
+ 'multiqueue': True},
+ 'sla': {
+ 'max_ppm': 1}}
result = {}
p = pktgen.Pktgen(args, self.ctx)
@@ -739,8 +751,10 @@ class PktgenTestCase(unittest.TestCase):
expected_result["packetsize"] = 60
self.assertEqual(result, expected_result)
+
def main():
unittest.main()
+
if __name__ == '__main__':
main()