def test_missing_param(self): command = Command() parser = scripts.get_parser_for(command) with self.assertRaises(SystemExit) as e: parser.parse_args('p1value'.split())
def test_parser_created(self): command = Command() parser = scripts.get_parser_for(command) env = parser.parse_args('p1value p2value'.split()) self.assertEquals('p1value', env.p1) self.assertEquals('p2value', env.p2)