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()
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()