'A link to an English doc with a local translation.'

def test_link_with_localization(self):

    en_d = DocumentFactory(title='A    doc')
    ApprovedRevisionFactory(document=en_d)
    fr_d = DocumentFactory(parent=en_d, title='Une    doc', locale='fr')
    link = pq(self.p.parse('[[A    doc]]', locale='fr'))
    eq_('/fr/kb/a-doc', link.find('a').attr('href'))
    eq_('A    doc', link.find('a').text())
    ApprovedRevisionFactory(document=fr_d)
    link = pq(self.p.parse('[[A    doc]]', locale='fr'))
    eq_('/fr/kb/une-doc', link.find('a').attr('href'))
    eq_('Une    doc', link.find('a').text())
