Example #1
0
 def test_main_KeyboardInterrupt(self, Command):
     cmd = Command.return_value = Mock()
     cmd.execute_from_commandline.side_effect = KeyboardInterrupt()
     mainfun()
     cmd.execute_from_commandline.assert_called_with(None)
Example #2
0
 def test_main(self, Command):
     cmd = Command.return_value = Mock()
     mainfun()
     cmd.execute_from_commandline.assert_called_with(None)