'Avanced event flow: no auto confirmation, manage minimum / maximum
seats, ...'

@mute_logger('odoo.addons.base.ir.ir_model', 'odoo.models')
def test_10_advanced_event_flow(self):

    self.env['ir.values'].set_default('event.config.settings', 'auto_confirmation', False)
    test_event = self.Event.sudo(self.user_eventmanager).create({'name': 'TestEvent', 'date_begin': (datetime.datetime.now() + relativedelta(days=(-1))), 'date_end': (datetime.datetime.now() + relativedelta(days=1)), 'seats_max': 10})
    self.assertEqual(test_event.state, 'draft', 'Event:    new    event    should    be    in    draft    state,    no    auto    confirmation')
    test_reg1 = self.Registration.sudo(self.user_eventuser).create({'name': 'TestReg1', 'event_id': test_event.id})
    self.assertEqual(test_reg1.state, 'draft', 'Event:    new    registration    should    not    be    confirmed    with    auto_confirmation    parameter    being    False')
