From a170555cef27a10e0a1163bbc10598d6c0b07ce6 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Thu, 27 Jul 2017 16:44:52 +0200 Subject: [PATCH] Get rid of the output when the tests run Django writes some stuff to the stdout, which happens to be mocked in our tests. I'm replacing the mocks with an empty string to get rid of that. Change-Id: I7281817ab7b07166e4410558edf30108cc3c750a --- horizon/test/tests/test_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/horizon/test/tests/test_commands.py b/horizon/test/tests/test_commands.py index cb9c4d9b21..9e5f9a2861 100644 --- a/horizon/test/tests/test_commands.py +++ b/horizon/test/tests/test_commands.py @@ -26,7 +26,7 @@ class CommandsTestCase(TestCase): def test_startdash_usage_empty(self): self.assertRaises(CommandError, call_command, 'startdash') - @mock.patch.object(startdash.Command, 'handle') + @mock.patch.object(startdash.Command, 'handle', return_value='') def test_startdash_usage_correct(self, handle): call_command('startdash', 'test_dash') @@ -40,7 +40,7 @@ class CommandsTestCase(TestCase): def test_startpanel_usage_empty(self): self.assertRaises(CommandError, call_command, 'startpanel') - @mock.patch.object(startpanel.Command, 'handle') + @mock.patch.object(startpanel.Command, 'handle', return_value='') def test_startpanel_usage_correct(self, handle): call_command('startpanel', 'test_dash', '--dashboard=foo.bar')