'Make sure the last post url links to the last post (#post-<id>).'

def test_last_thread_post_link_has_post_id(self):

    u = UserFactory()
    t = ThreadFactory()
    t.new_post(creator=u, content='foo')
    p2 = t.new_post(creator=u, content='bar')
    response = get(self.client, 'wiki.discuss.threads', args=[t.document.slug])
    doc = pq(response.content)
    last_post_link = doc('ol.threads    div.last-post    a:not(.username)')[0]
    href = last_post_link.attrib['href']
    eq_(href.split('#')[1], ('post-%d' % p2.id))
