def test_occupy_seat_with_bundled_ticket(self): ticket_quantity = 1 ticket_bundle = ticket_bundle_service.create_bundle( self.category_id, ticket_quantity, self.owner.id) bundled_ticket = ticket_bundle.tickets[0] area = self.create_area('main', 'Main Hall') seat = seat_service.create_seat(area, 0, 0, self.category_id) with raises(SeatChangeDeniedForBundledTicket): ticket_service.occupy_seat(bundled_ticket.id, seat.id, self.owner.id)
def create_bundle(party_id, quantity, owner): category = create_category(party_id, 'Premium') return bundle_service.create_bundle(category.id, quantity, owner.id)
def create_bundle(self, quantity): category = self.create_category('Premium') owner = self.create_user('Ticket_Owner') return bundle_service.create_bundle(category.id, quantity, owner.id)