Merge pull request #229 from mininet/devel/mobility-example

A simple mobility API and example
This commit is contained in:
lantz
2014-09-22 12:31:31 -07:00
3 changed files with 163 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python
"""
Test for mobility.py
"""
import unittest
from subprocess import check_output
class testMobility( unittest.TestCase ):
def testMobility( self ):
"Run the example and verify its 4 ping results"
cmd = 'python -m mininet.examples.mobility 2>&1'
grep = ' | grep -c " 0% dropped" '
result = check_output( cmd + grep, shell=True )
assert int( result ) == 4
if __name__ == '__main__':
unittest.main()