Hila Ben Abraham | e8c22e9 | 2016-10-20 14:30:32 -0500 | [diff] [blame] | 1 | #!/usr/bin/python2 |
| 2 | |
| 3 | import os |
| 4 | import unittest |
| 5 | import subprocess |
| 6 | |
| 7 | class test_nack(unittest.TestCase): |
| 8 | """Test case for testing nack""" |
| 9 | |
| 10 | def setUp(self): |
| 11 | print "\nTesting nack with best-route" |
| 12 | print "*****************************" |
| 13 | os.chdir("test_nack") |
| 14 | os.system("mkdir -p logs") |
| 15 | |
| 16 | def tearDown(self): |
| 17 | print "********************************" |
| 18 | os.chdir("..") |
| 19 | |
| 20 | def test_nack(self): |
| 21 | print ">>> test nack <<<" |
| 22 | |
| 23 | ret = subprocess.call(['./nack-test.sh'], shell=True) |
| 24 | |
| 25 | if (ret != 0): |
| 26 | self.fail(" >> TEST NACK FAILED") |
| 27 | else: |
| 28 | print ">> TEST NACK PROCEDURE PASSED SUCCESSFULLY" |
| 29 | |