'Check warning is being showed if another updated revision'

def test_warning_showing_while_new_revision(self):

    rev = TranslatedRevisionFactory()
    trans = rev.document
    doc = trans.parent
    draft = DraftRevisionFactory(creator=self.user, locale=trans.locale, document=doc, based_on=rev.based_on)
    rev2 = ApprovedRevisionFactory(document=doc, is_ready_for_localization=True)
    RevisionFactory(based_on=rev2, document=trans)
    draft_request = {'restore': 'Restore'}
    trans_url = reverse('wiki.translate', locale=draft.locale, args=[doc.slug])
    trans_resp = self.client.get(trans_url, draft_request)
    trans_content = pq(trans_resp.content)
    eq_(1, len(trans_content('.user-messages    li.draft-warning')))
