':py:obj:`X509Type.set_notBefore` takes a string in the format of an ASN1
GENERALIZEDTIME and sets the beginning of the certificate\'s validity
period to it.'

def _setBoundTest(self, which):

    certificate = X509()
    set = getattr(certificate, ('set_not' + which))
    get = getattr(certificate, ('get_not' + which))
    self.assertEqual(get(), None)
    when = b('20040203040506Z')
    set(when)
    self.assertEqual(get(), when)
    when = b('20040203040506+0530')
    set(when)
    self.assertEqual(get(), when)
    when = b('20040203040506-0115')
    set(when)
    self.assertEqual(get(), when)
    self.assertRaises(ValueError, set, b('foo    bar'))
    self.assertRaises(TypeError, set)
    self.assertRaises(TypeError, set, b('20040203040506Z'), b('20040203040506Z'))
    self.assertRaises(TypeError, get, b('foo    bar'))
