'Confirm we can set and get revocation reasons from
:py:obj:`OpenSSL.crypto.Revoked`.  The "get" need to work
as "set".  Likewise, each reason of all_reasons() must work.'

def test_reason(self):

    revoked = Revoked()
    for r in revoked.all_reasons():
        for x in range(2):
            ret = revoked.set_reason(r)
            self.assertEquals(ret, None)
            reason = revoked.get_reason()
            self.assertEquals(reason.lower().replace(b('    '), b('')), r.lower().replace(b('    '), b('')))
            r = reason
    revoked.set_reason(None)
    self.assertEqual(revoked.get_reason(), None)
