'Test restoring a draft which is based on an old based on'

def test_restore_draft_revision_with_older_based_on(self):

    draft = DraftRevisionFactory(creator=self.user)
    rev1 = draft.based_on
    doc = draft.document
    rev2 = ApprovedRevisionFactory(document=doc, is_ready_for_localization=True)
    trans_url = reverse('wiki.translate', locale=draft.locale, args=[doc.slug])
    trans_resp = self.client.get(trans_url)
    trans_content = pq(trans_resp.content)
    eq_(rev2.content, trans_content('.content    textarea').text())
    draft_request = {'restore': 'Restore'}
    cache.clear()
    trans_resp = self.client.get(trans_url, draft_request)
    trans_content = pq(trans_resp.content)
    eq_(rev1.content, trans_content('.content    textarea').text())
    assert (rev2.content != trans_content('.content    textarea').text())
