def test_ticket_is_excluded(self): ''' a ticket in the held tickets matches the exclusion set ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true(self.ticketingexclusion.is_excluded([problem_ticket]))
def test_condition_role_exclusion(self): ''' condition has a role exclusion, and no tickets are provided ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true( self.roleexclusion.condition.is_excluded([], self.schedule))
def test_ticket_is_excluded(self): ''' a ticket in the held tickets matches the exclusion set ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true( self.ticketingexclusion.is_excluded([problem_ticket]))
def test_condition_ticket_exclusion(self): ''' condition has a ticketing exclusion, which is triggered ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true( self.ticketingexclusion.condition.is_excluded([problem_ticket], self.schedule))
def test_condition_role_exclusion(self): ''' condition has a role exclusion, and no tickets are provided ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true( self.roleexclusion.condition.is_excluded( [], self.teacher.performer_profile, self.conference))
def setUp(self): self.client = Client() self.ticketitem = TicketItemFactory.create() self.privileged_user = ProfileFactory.create().\ user_object grant_privilege(self.privileged_user, 'Ticketing - Admin') self.url = reverse(self.view_name, args=[self.ticketitem.pk], urlconf='ticketing.urls')
def test_condition_role_exclusion(self): ''' condition has a role exclusion, and no tickets are provided ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true(self.roleexclusion.condition.is_excluded( [], self.teacher.performer_profile, self.conference))
def test_condition_ticket_exclusion(self): ''' condition has a ticketing exclusion, which is triggered ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true( self.ticketingexclusion.condition.is_excluded( [problem_ticket], self.teacher.performer_profile, self.conference))
def test_condition_ticket_exclusion(self): ''' condition has a ticketing exclusion, which is triggered ''' problem_ticket = TicketItemFactory.create() self.ticketingexclusion.tickets.add(problem_ticket) nt.assert_true( self.ticketingexclusion.condition.is_excluded( [problem_ticket], self.teacher.performer_profile, self.conference ))
def test_no_ticket_excluded(self): ''' the ticket is not in the excluded set ''' diff_ticket = TicketItemFactory.create() nt.assert_false(self.ticketingexclusion.is_excluded([diff_ticket]))