test_event_sale_ui.py 949 B

1234567891011121314151617181920212223242526272829
  1. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  2. from datetime import timedelta
  3. from odoo.fields import Datetime
  4. from odoo.tests import HttpCase, tagged
  5. @tagged('post_install', '-at_install')
  6. class TestUi(HttpCase):
  7. def test_event_configurator(self):
  8. event = self.env['event.event'].create({
  9. 'name': 'Design Fair Los Angeles',
  10. 'date_begin': Datetime.now() + timedelta(days=1),
  11. 'date_end': Datetime.now() + timedelta(days=5),
  12. })
  13. self.env['event.event.ticket'].create([{
  14. 'name': 'Standard',
  15. 'event_id': event.id,
  16. 'product_id': self.env.ref('event_sale.product_product_event').id,
  17. }, {
  18. 'name': 'VIP',
  19. 'event_id': event.id,
  20. 'product_id': self.env.ref('event_sale.product_product_event').id,
  21. }])
  22. self.start_tour("/web", 'event_configurator_tour', login="admin")