7 from vstf.common import utils
10 class TestUtils(unittest.TestCase):
17 def test_ns_cmd(self):
20 exp_cmd = "ip netns exec xx ls"
21 ret = utils.ns_cmd(ns, cmd)
22 self.assertEqual(ret, exp_cmd, "ns_cmd failed to add ns header prefix:%s != %s" % (ret, exp_cmd))
25 if __name__ == "__main__":
28 logging.getLogger(__name__)
29 logging.basicConfig(level=logging.DEBUG)
30 # import sys;sys.argv = ['', 'Test.testName']