def test_root_certs(self): ''' Check we can load *all* the root certificates into the RootCertificates object. ''' root_certs = RootCertificates() root_certs.load_certs(ROOT_CERTS) certs = root_certs.get_certs() for c,pem in ROOT_CERTS.items(): x509 = load_certificate(FILETYPE_PEM, pem) self.assert_(x509 not in certs, 'x509 object missing from store: %s' % x509)