Merge "Add 8 port topology file for agnostic vnf with ixia tg"
[yardstick.git] / yardstick / tests / unit / benchmark / scenarios / networking / test_ping6.py
index d2be6f5..ad5217a 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -16,6 +14,7 @@ import mock
 import unittest
 
 from yardstick.benchmark.scenarios.networking import ping6
+from yardstick.common import exceptions as y_exc
 
 
 class PingTestCase(unittest.TestCase):
@@ -100,7 +99,7 @@ class PingTestCase(unittest.TestCase):
         p = ping6.Ping6(args, self.ctx)
         p.client = mock_ssh.SSH.from_node()
         mock_ssh.SSH.from_node().execute.side_effect = [(0, 'host1', ''), (0, 100, '')]
-        self.assertRaises(AssertionError, p.run, result)
+        self.assertRaises(y_exc.SLAValidationError, p.run, result)
 
     @mock.patch('yardstick.benchmark.scenarios.networking.ping6.ssh')
     def test_ping_unsuccessful_script_error(self, mock_ssh):
@@ -116,10 +115,3 @@ class PingTestCase(unittest.TestCase):
         mock_ssh.SSH.from_node().execute.side_effect = [
             (0, 'host1', ''), (1, '', 'FOOBAR')]
         self.assertRaises(RuntimeError, p.run, result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()