From 8be4acd7ec27861d015cfd33e64723180a38937b Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 27 May 2021 13:54:27 -0400 Subject: [PATCH] Faking sys.stdout doesn't go well since we lookup encoding attribute. --- src/allmydata/test/cli/test_status.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/allmydata/test/cli/test_status.py b/src/allmydata/test/cli/test_status.py index 4488299b2..58818ed41 100644 --- a/src/allmydata/test/cli/test_status.py +++ b/src/allmydata/test/cli/test_status.py @@ -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):