summaryrefslogtreecommitdiff
path: root/src/leap/util/tests/test_leap_argparse.py
blob: 173c87bb84aa1638624554d81f3c3d58c4cf4d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from argparse import Namespace
import unittest

from leap.util import leap_argparse


class LeapArgParseTest(unittest.TestCase):
    """
    Test argparse options for eip client
    """

    def setUp(self):
        """
        get the parser
        """
        self.parser = leap_argparse.build_parser()

    def test_debug_mode(self):
        """
        test debug mode option
        """
        opts = self.parser.parse_args(
            ['--debug'])
        self.assertEqual(
            opts,
            Namespace(
                config_file=None,
                debug=True,
                log_file=None,
                openvpn_verb=None))

if __name__ == "__main__":
    unittest.main()