예제 #1
0
 def test_shell_main(self, mock_shell):
     mock_shell.side_effect = exc.CommandError("some_message")
     shell.main()
     self.assertEqual("some_message\n", sys.stdout.getvalue())
예제 #2
0
 def test_shell_main(self, mock_shell):
     mock_shell.side_effect = exc.CommandError('some_message')
     shell.main()
     self.assertEqual('some_message\n', sys.stdout.getvalue())