diff options
| author | kali <kali@leap.se> | 2012-08-08 20:06:14 +0900 | 
|---|---|---|
| committer | kali <kali@leap.se> | 2012-08-08 20:06:14 +0900 | 
| commit | b1e025a343d0c6019127871acb47d7b295d342e9 (patch) | |
| tree | b5d175e1bf8b625433ba8d8ec83cb45b0ccc8618 /tests/test_vpn_management.py | |
| parent | c1fa99be4dc4174a34620324ec5056b793196b53 (diff) | |
| parent | 60a51aed9c1ee9249a79b3d996ae86d93a9532de (diff) | |
Merge branch 'tests-cleanup' into develop
moved out old broken stuff;
copied a run_scripts entry point for tests;
created a bunch of (mostly stubs) simple tests on secondary
functions.
Diffstat (limited to 'tests/test_vpn_management.py')
| -rw-r--r-- | tests/test_vpn_management.py | 42 | 
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/test_vpn_management.py b/tests/test_vpn_management.py deleted file mode 100644 index d8a0314b..00000000 --- a/tests/test_vpn_management.py +++ /dev/null @@ -1,42 +0,0 @@ -import unittest -import sys -import time - -from eip_client.mocks.manager import get_openvpn_manager_mocks - - -class VPNManagerTests(unittest.TestCase): - -    def setUp(self): -        self.manager = get_openvpn_manager_mocks() - -    # -    # tests -    # - -    def test_status_command(self): -        ret = self.manager.status() -        #print ret - -    def test_connection_state(self): -        ts, status, ok, ip, remote = self.manager.get_connection_state() -        self.assertTrue(status in ('CONNECTED', 'DISCONNECTED')) -        self.assertTrue(isinstance(ts, time.struct_time)) - -    def test_status_io(self): -        when_ts, counters  = self.manager.get_status_io() -        self.assertTrue(isinstance(when_ts, time.struct_time)) -        self.assertEqual(len(counters), 5) -        self.assertTrue(all(map(lambda x: x.isdigit(), counters))) - - -def test(): -    suite = unittest.TestSuite() -    for cls in (VPNManagerTests,): -        suite.addTest(unittest.makeSuite(cls)) -    runner = unittest.TextTestRunner(sys.stdout, verbosity=2, -                                         failfast=False) -    result = runner.run(suite) - -if __name__ == "__main__": -    test()  | 
