'Verify that its not possible to review a revision older than the current revision'

def test_review_past_revision(self):

    r1 = RevisionFactory(is_approved=False)
    r2 = RevisionFactory(document=r1.document, is_approved=True)
    r1.document.current_revision = r2
    r1.document.save()
    u = UserFactory()
    add_permission(u, Revision, 'review_revision')
    self.client.login(username=u.username, password='testpass')
    response = get(self.client, 'wiki.review_revision', args=[r1.document.slug, r1.id])
    eq_(200, response.status_code)
    message1 = 'A    newer    revision    has    already    been    reviewed.'
    message2 = 'This    revision    is    outdated,    but    there    is    a    new    revision    available.    Please    review    the    latest    revision.'
    doc = pq(response.content)
    doc_content = doc('#review-revision').text()
    assert (message1 in doc_content)
    assert (message2 not in doc_content)
    RevisionFactory(document=r1.document, is_approved=False)
    response = get(self.client, 'wiki.review_revision', args=[r1.document.slug, r1.id])
    doc = pq(response.content)
    doc_content = doc('#review-revision').text()
    assert (message1 not in doc_content)
    assert (message2 in doc_content)
