'POSTing to the delete view with an unsafe next url will ignore the
provided url when redirecting.'

def testDeletePostUnsafeNext(self):

    comments = self.createSomeComments()
    pk = comments[0].pk
    makeModerator(u'normaluser')
    self.client.login(username=u'normaluser', password=u'normaluser')
    response = self.client.post((u'/delete/%d/' % pk), {u'next': u'http://elsewhere/bad'})
    self.assertEqual(response[u'Location'], (u'http://testserver/deleted/?c=%d' % pk))
