'Editing a localized article \'based on\' an older revision of the
localization is OK.'

def test_localized_based_on(self):

    en_r = RevisionFactory()
    fr_d = DocumentFactory(parent=en_r.document, locale='fr')
    RevisionFactory(document=fr_d, based_on=en_r, is_approved=True)
    fr_r = RevisionFactory(document=fr_d, based_on=en_r, keywords='oui', summary='lipsum')
    url = reverse('wiki.new_revision_based_on', locale='fr', args=(fr_d.slug, fr_r.pk))
    response = self.client.get(url)
    doc = pq(response.content)
    input = doc('#id_based_on')[0]
    eq_(int(input.value), en_r.pk)
    eq_(doc('#id_keywords')[0].attrib['value'], 'oui')
    eq_(doc('#id_summary').text(), 'lipsum')
