Faking sys.stdout doesn't go well since we lookup encoding attribute.

This commit is contained in:
Itamar Turner-Trauring 2021-05-27 13:54:27 -04:00
parent eddd9550f0
commit 8be4acd7ec

View File

@ -130,9 +130,10 @@ class Integration(GridTestMixin, CLITestMixin, unittest.TestCase):
d.addCallback(_check) d.addCallback(_check)
return d return d
@mock.patch('sys.stdout') @defer.inlineCallbacks
def test_help(self, fake): def test_help(self):
return self.do_cli('status', '--help') rc, _, _ = yield self.do_cli('status', '--help')
self.assertEqual(rc, 0)
class CommandStatus(unittest.TestCase): class CommandStatus(unittest.TestCase):