'Reverting to a specific revision.'

def test_revert(self):

    rev = revision(is_approved=True, save=True, content='Test    reverting')
    old_id = rev.id
    revision(document=rev.document, title='Test    reverting', content='An    edit    to    revert', comment='This    edit    gets    reverted', is_approved=True)
    rev.save()
    reverted = rev.document.revert(rev, rev.creator)
    ok_(('Revert    to' in reverted.comment))
    ok_(('Test    reverting' == reverted.content))
    ok_((old_id != reverted.id))
