'Confirm we can set and get revocation dates from
:py:obj:`OpenSSL.crypto.Revoked`.  Confirm errors are handled
with grace.'

def test_date(self):

    revoked = Revoked()
    date = revoked.get_rev_date()
    self.assertEquals(date, None)
    now = b(datetime.now().strftime('%Y%m%d%H%M%SZ'))
    ret = revoked.set_rev_date(now)
    self.assertEqual(ret, None)
    date = revoked.get_rev_date()
    self.assertEqual(date, now)
