def test_show_migration_not_exist(self, m_get_instance, m_get_mig): m_get_mig.side_effect = exception.MigrationNotFoundForInstance( migration_id=migrations_obj[0].id, instance_id=SERVER_UUID) self.assertRaises(webob.exc.HTTPNotFound, self.controller.show, self.req, SERVER_UUID, migrations_obj[0].id) m_get_instance.assert_called_once_with(self.context, SERVER_UUID, expected_attrs=None)
def test_cancel_live_migration_migration_not_found(self): self._test_cancel_live_migration_failed( exception.MigrationNotFoundForInstance(migration_id='', instance_id=''), webob.exc.HTTPNotFound)