Beispiel #1
0
    def test_get_tickets_for_volunteer_opp(self):
        '''should get no tickets, volunteer opportunities are free
        '''
        event = GenericEventFactory()
        tickets = event.get_tickets()

        self.assertEqual(tickets, [])
Beispiel #2
0
    def test_get_tickets_for_master_class(self):
        '''get the one ticket that is active for the Master Class
        '''
        event = GenericEventFactory(type='Master')
        ticketing_event = TicketingEventsFactory(conference=event.e_conference,
                                                 title="Master Class 2017")
        ticketing_event.linked_events.add(event)
        ticketing_event.save()
        TicketItemFactory(ticketing_event=ticketing_event,
                          live=True,
                          has_coupon=False)
        tickets = event.get_tickets()

        self.assertEqual(len(tickets), 1)
        self.assertEqual(tickets[0].title, "Master Class 2017")
Beispiel #3
0
    def test_get_tickets_for_special_event(self):
        '''get the one ticket that is active for all except master classes
        '''
        event = GenericEventFactory(type='Special')
        ticketing_event = TicketingEventsFactory(
            conference=event.e_conference,
            include_most=True,
            title="The Whole Shebang 2016")
        TicketItemFactory(ticketing_event=ticketing_event,
                          live=True,
                          has_coupon=False)

        tickets = event.get_tickets()

        self.assertEqual(len(tickets), 1)
        self.assertEqual(tickets[0].title, "The Whole Shebang 2016")
Beispiel #4
0
    def test_get_tickets_for_master_class(self):
        '''get the one ticket that is active for the Master Class
        '''
        event = GenericEventFactory(
            type='Master')
        bpt_event = BrownPaperEventsFactory(conference=event.e_conference,
                                            title="Master Class 2017")
        bpt_event.linked_events.add(event)
        bpt_event.save()
        TicketItemFactory(bpt_event=bpt_event,
                          live=True,
                          has_coupon=False)
        tickets = event.get_tickets()

        self.assertEqual(len(tickets), 1)
        self.assertEqual(
            tickets[0].title,
            "Master Class 2017")
Beispiel #5
0
    def test_get_tickets_for_special_event(self):
        '''get the one ticket that is active for all except master classes
        '''
        event = GenericEventFactory(
            type='Special')
        bpt_event = BrownPaperEventsFactory(
            conference=event.e_conference,
            include_most=True,
            title="The Whole Shebang 2016")
        TicketItemFactory(bpt_event=bpt_event,
                          live=True,
                          has_coupon=False)

        tickets = event.get_tickets()

        self.assertEqual(len(tickets), 1)
        self.assertEqual(
            tickets[0].title,
            "The Whole Shebang 2016")