summaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/networking/test_pktgen.py
diff options
context:
space:
mode:
authorEmma Foley <emma.l.foley@intel.com>2018-01-10 10:48:29 +0000
committerEmma Foley <emma.l.foley@intel.com>2018-01-25 20:03:46 +0000
commit44ee5e004f3af5dcdbbc1d172faba91b8419b6d6 (patch)
treef81cd5a5af0f267f981339d9ac0d4eba5c666264 /tests/unit/benchmark/scenarios/networking/test_pktgen.py
parente67082ecf9c89eeebbdf2c87b0a90e3edef2eabd (diff)
Make files pep8 compliant before using assertTrue|False
JIRA: YARDSTICK-903 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: Id7912b5ddee36e7366bcfa824379853efd0a89f1
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()