Esempio n. 1
0
 def test_guest_wont_stop_mysql(self):
     self.guest.stop_db(do_not_start_on_reboot=True)\
         .AndRaise(RPCException("Could not stop MySQL!"))
Esempio n. 2
0
 def test_guest_wont_stop_mysql(self):
     self.guest.stop_db.side_effect = RPCException("Could not stop MySQL!")
     self.assertRaises(RPCException, self.action.execute)
     self.assertEqual(1, self.guest.stop_db.call_count)
     self.instance.update_db.assert_called_once_with(
         task_status=InstanceTasks.NONE)