'Test index page with login at /calendar/event/view/<event_id>'

def test_event_add(self):

    response = self.client.post('/accounts/login', {'username': self.username, 'password': self.password})
    self.assertRedirects(response, '/')
    response = self.client.get(reverse('events_event_add'))
    self.assertEquals(response.status_code, 200)
    self.assertEquals(Event.objects.count(), 1)
    post_data = {'name': 'TestStatus', 'end': datetime.now()}
    response = self.client.post(reverse('events_event_add'), post_data)
    self.assertEquals(response.status_code, 302)
    self.assertEquals(Event.objects.count(), 2)
