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)
return d
@mock.patch('sys.stdout')
def test_help(self, fake):
return self.do_cli('status', '--help')
@defer.inlineCallbacks
def test_help(self):
rc, _, _ = yield self.do_cli('status', '--help')
self.assertEqual(rc, 0)
class CommandStatus(unittest.TestCase):