From 86b2b4f0a5e5c5513e8a1e6b32cc42577d00d072 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Thu, 10 Jun 2010 11:48:01 -0400 Subject: [PATCH] Don't compare the dest ("telnet") with the option string ("--telnet"). --- tests/baseclass.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/baseclass.py b/tests/baseclass.py index 7f2f3dc..1e40909 100644 --- a/tests/baseclass.py +++ b/tests/baseclass.py @@ -83,7 +83,7 @@ class CommandTest(unittest.TestCase): parser = self.getParser(cmd) for op in parser.op.option_list: - if op.dest == opt: + if op.get_opt_string() == opt: self.assert_(op.deprecated) def assert_removed(self, cmd, opt): @@ -97,14 +97,14 @@ class CommandTest(unittest.TestCase): option_list''' parser = self.getParser(cmd) for op in parser.op.option_list: - if op.dest == opt: + if op.get_opt_string() == opt: self.assert_(op.required) def assert_type(self, cmd, opt, opt_type): '''Ensure that the provided option is of the requested type''' parser = self.getParser(cmd) for op in parser.op.option_list: - if op.dest == opt: + if op.get_opt_string() == opt: self.assertEqual(op.type, opt_type) def loadModules(moduleDir, cls_pattern="_TestCase", skip_list=["__init__", "baseclass"]): -- 2.11.4.GIT