示例#1
0
 def test_run(self):
     out = WhateverIO()
     h = help(app=self.app, stdout=out)
     h.parser = Mock()
     assert h.run() == EX_USAGE
     assert out.getvalue()
     assert h.usage('help')
     h.parser.print_help.assert_called_with()
示例#2
0
 def test_run(self):
     out = WhateverIO()
     h = help(app=self.app, stdout=out)
     h.parser = Mock()
     self.assertEqual(h.run(), EX_USAGE)
     self.assertTrue(out.getvalue())
     self.assertTrue(h.usage('help'))
     h.parser.print_help.assert_called_with()
示例#3
0
 def test_run(self):
     out = WhateverIO()
     h = help(app=self.app, stdout=out)
     h.parser = Mock()
     assert h.run() == EX_USAGE
     assert out.getvalue()
     assert h.usage('help')
     h.parser.print_help.assert_called_with()