From 44ee5e004f3af5dcdbbc1d172faba91b8419b6d6 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Wed, 10 Jan 2018 10:48:29 +0000 Subject: Make files pep8 compliant before using assertTrue|False JIRA: YARDSTICK-903 Signed-off-by: Emma Foley Change-Id: Id7912b5ddee36e7366bcfa824379853efd0a89f1 --- .../benchmark/scenarios/networking/test_pktgen.py | 34 +++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'tests/unit/benchmark/scenarios/networking/test_pktgen.py') 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() -- cgit 1.2.3-korg