def test_no_schedule(self): Conference.objects.all().delete() show = ShowFactory() SchedEventFactory.create(eventitem=show.eventitem_ptr) login_as(ProfileFactory(), self) response = self.client.get(self.url) self.assertTrue(response.content.count('\n') == 1) self.assertTrue('Session Title' in response.content)
def test_no_schedule(self): Conference.objects.all().delete() show = ShowFactory() SchedEventFactory.create(eventitem=show.eventitem_ptr) login_as(ProfileFactory(), self) response = self.client.get(self.url) self.assertTrue(response.content.count('\n') == 1) self.assertTrue('Session Title' in response.content)
def book_worker_item_for_role(workeritem, role, eventitem=None): worker = WorkerFactory.create(_item=workeritem, role=role) if eventitem: event = SchedEventFactory.create(eventitem=eventitem) else: event = SchedEventFactory.create() booking = ResourceAllocationFactory.create(event=event, resource=worker) return booking
def book_worker_item_for_role(workeritem, role, eventitem=None): worker = WorkerFactory.create(_item=workeritem, role=role) if eventitem: event = SchedEventFactory.create(eventitem=eventitem) else: event = SchedEventFactory.create() EventLabelFactory(event=event, text=event.eventitem.e_conference.conference_slug) EventLabelFactory(event=event, text=event.eventitem.calendar_type) booking = ResourceAllocationFactory.create(event=event, resource=worker) return booking
def book_worker_item_for_role(workeritem, role, eventitem=None): worker = WorkerFactory.create( _item=workeritem, role=role) if eventitem: event = SchedEventFactory.create( eventitem=eventitem) else: event = SchedEventFactory.create() booking = ResourceAllocationFactory.create( event=event, resource=worker ) return booking
def book_act_item_for_show(actitem, eventitem): booking = ResourceAllocationFactory.create( event=SchedEventFactory.create( eventitem=eventitem), resource=ActResourceFactory.create( _item=actitem)) return booking
def book_act_item_for_show(actitem, eventitem): booking = ResourceAllocationFactory.create( event=SchedEventFactory.create(eventitem=eventitem), resource=ActResourceFactory.create(_item=actitem)) EventLabelFactory(event=booking.event, text=eventitem.e_conference.conference_slug) EventLabelFactory(event=booking.event, text=eventitem.calendar_type) return booking
def book_act_item_for_show(actitem, eventitem): booking = ResourceAllocationFactory.create( event=SchedEventFactory.create(eventitem=eventitem), resource=WorkerFactory.create(_item=actitem.performer, role="Performer")) order = OrderingFactory(allocation=booking, class_id=actitem.pk, class_name="Act") EventLabelFactory(event=booking.event, text=eventitem.e_conference.conference_slug) EventLabelFactory(event=booking.event, text=eventitem.calendar_type) return booking
def book_worker_item_for_role(workeritem, role, eventitem=None): worker = WorkerFactory.create( _item=workeritem, role=role) if eventitem: event = SchedEventFactory.create( eventitem=eventitem) else: event = SchedEventFactory.create() EventLabelFactory( event=event, text=event.eventitem.e_conference.conference_slug ) EventLabelFactory( event=event, text=event.eventitem.calendar_type ) booking = ResourceAllocationFactory.create( event=event, resource=worker ) return booking
def book_act_item_for_show(actitem, eventitem): booking = ResourceAllocationFactory.create( event=SchedEventFactory.create( eventitem=eventitem), resource=ActResourceFactory.create( _item=actitem)) EventLabelFactory( event=booking.event, text=eventitem.e_conference.conference_slug ) EventLabelFactory( event=booking.event, text=eventitem.calendar_type ) return booking
def test_repeated_lead_shows_once(self): show = ShowFactory() sched_events = [ SchedEventFactory.create(eventitem=show.eventitem_ptr) for i in range(2) ] staff_lead = ProfileFactory() lead_worker = WorkerFactory(_item=staff_lead.workeritem_ptr, role="Staff Lead") for se in sched_events: ResourceAllocationFactory.create(event=se, resource=lead_worker) response = self.client.get( reverse(self.view_name, urlconf="gbe.scheduling.urls", args=[show.eventitem_id])) self.assertEqual(200, response.status_code) self.assertEqual(1, response.content.count(staff_lead.display_name))
def book_act_item_for_show(actitem, eventitem): booking = ResourceAllocationFactory.create( event=SchedEventFactory.create(eventitem=eventitem), resource=ActResourceFactory.create(_item=actitem)) return booking