'Test index page with login at /documents/weblink/add/'

def test_weblink_add(self):

    response = self.client.post('/accounts/login', {'username': self.username, 'password': self.password})
    self.assertRedirects(response, '/')
    response = self.client.get(reverse('documents_weblink_add'))
    self.assertEquals(response.status_code, 200)
    self.assertEqual(WebLink.objects.count(), 1)
    response = self.client.get(reverse('documents_weblink_add'))
    post_data = {'title': 'test', 'folder': self.folder, 'url': 'test'}
    response = self.client.post(reverse('documents_weblink_add'), post_data)
