From c46d8da153ac658c8bd145376e22b1218db1090a Mon Sep 17 00:00:00 2001 From: kali Date: Sun, 22 Jul 2012 21:10:15 -0700 Subject: initial import --- tests/test_argparse.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/test_argparse.py (limited to 'tests/test_argparse.py') diff --git a/tests/test_argparse.py b/tests/test_argparse.py new file mode 100644 index 0000000..0f2b08a --- /dev/null +++ b/tests/test_argparse.py @@ -0,0 +1,26 @@ +from argparse import Namespace +import unittest + +from eip_client.utils import eip_argparse + + +class EIPArgParseTest(unittest.TestCase): + """ + Test argparse options for eip client + """ + + def setUp(self): + """ + get the parser + """ + self.parser = eip_argparse.build_parser() + + def test_debug_mode(self): + """ + test debug mode option + """ + opts = self.parser.parse_args( + ['--debug']) + self.assertEqual(opts, + Namespace(config=None, + debug=True)) -- cgit v1.2.3