'Assure Revision.clean() changes a bad based_on value to the English
doc\'s current_revision when there is one.'

def test_correct_based_on_to_current_revision(self):

    en_rev = ApprovedRevisionFactory()
    de_doc = DocumentFactory(parent=en_rev.document, locale='de')
    de_rev = RevisionFactory(document=de_doc)
    de_rev.based_on = RevisionFactory()
    self.assertRaises(ValidationError, de_rev.clean)
    eq_(en_rev.document.current_revision, de_rev.based_on)
