'Test the different "next" actions the comment view can take'

def testCommentNext(self):

    a = Article.objects.get(pk=1)
    data = self.getValidData(a)
    response = self.client.post('/post/', data)
    location = response['Location']
    match = post_redirect_re.match(location)
    self.assertTrue((match != None), ('Unexpected    redirect    location:    %s' % location))
    data['next'] = '/somewhere/else/'
    data['comment'] = 'This    is    another    comment'
    response = self.client.post('/post/', data)
    location = response['Location']
    match = re.search('^http://testserver/somewhere/else/\\?c=\\d+$', location)
    self.assertTrue((match != None), ('Unexpected    redirect    location:    %s' % location))
