'Never offer an unready-for-localization revision as diff text when
bringing an already translated article up to date.'

def test_skip_unready_when_not_first_translation(self):

    initial_rev = TranslatedRevisionFactory(is_approved=True)
    doc = initial_rev.document
    en_doc = doc.parent
    ready = ApprovedRevisionFactory(document=en_doc, is_ready_for_localization=True)
    ApprovedRevisionFactory(document=en_doc, is_ready_for_localization=False)
    url = reverse('wiki.translate', locale=doc.locale, args=[en_doc.slug])
    response = self.client.get(url)
    eq_(200, response.status_code)
    to_link = pq(response.content)('.revision-diff    h3    a')[1].attrib['href']
    assert to_link.endswith(('/%s' % ready.pk))
