def test_reject_event_status(self):
        pending_event = self.create_event(status="PENDING")
        reject = reject_event_status(pending_event.id)

        test_event = Event.objects.get(pk=pending_event.id)
        self.assertEqual(test_event.status, "REJECTED")

        rejected_event = self.create_event(status="REJECTED")
        pending = reject_event_status(rejected_event.id)

        test_event1 = Event.objects.get(pk=rejected_event.id)
        self.assertEqual(test_event1.status, "PENDING")
    def test_reject_event_status(self):
        pending_event = self.create_event(status="PENDING")
        reject = reject_event_status(pending_event.id)

        test_event = Event.objects.get(pk=pending_event.id)
        self.assertEqual(test_event.status, "REJECTED")

        rejected_event = self.create_event(status="REJECTED")
        pending = reject_event_status(rejected_event.id)

        test_event1 = Event.objects.get(pk=rejected_event.id)
        self.assertEqual(test_event1.status, "PENDING")
示例#3
0
def reject_status(request, event_id):
    event = reject_event_status(event_id)

    return HttpResponseRedirect(
        reverse(
            'web.view_changed_event',
            args=[
                event_id,
                event.slug]))
示例#4
0
def reject_status(request, event_id):
    event = reject_event_status(event_id)

    return HttpResponseRedirect(
        reverse('web.view_event', args=[event_id, event.slug]))