def test_from_revision_none(self): rev = revision() try: diff = revisions_unified_diff(None, rev) except AttributeError: self.fail("Should not throw AttributeError") eq_("Diff is unavailable.", diff)