You may also wish to generate invalid certs (validity date range falling into T - 10years, or missing private key). You may wish to do this via a cert factory function:
valid_cert = create_cert()
expired_cert = create_cert(expired=True)
nokey_cert = valid_cert.remove_key() # <-- Made this method up, but you can do it with some other calls.