add yardstick iruya 9.0.0 release notes
[yardstick.git] / yardstick / tests / unit / benchmark / scenarios / networking / test_pktgen_dpdk_throughput.py
index 1b12bd5..39392e4 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 ##############################################################################
 # Copyright (c) 2017 Nokia and others.
 #
@@ -17,6 +16,7 @@ from oslo_serialization import jsonutils
 import mock
 
 from yardstick.benchmark.scenarios.networking import pktgen_dpdk_throughput
+from yardstick.common import exceptions as y_exc
 
 
 # pylint: disable=unused-argument
@@ -132,7 +132,7 @@ class PktgenDPDKTestCase(unittest.TestCase):
         sample_output = '{"packets_per_second": 9753, "errors": 0, \
             "packets_sent": 149776, "flows": 110}'
         mock_ssh.SSH().execute.return_value = (0, sample_output, '')
-        self.assertRaises(AssertionError, p.run, result)
+        self.assertRaises(y_exc.SLAValidationError, p.run, result)
 
     def test_pktgen_dpdk_throughput_unsuccessful_script_error(
             self, mock_ssh):
@@ -192,11 +192,3 @@ class PktgenDPDKTestCase(unittest.TestCase):
 
         mock_ssh.SSH().execute.assert_called_with(
             "sudo /dpdk/destdir/bin/dpdk-procinfo -- --stats-reset > /dev/null 2>&1")
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()