def test_ssl_expiry_datetime_valid(self): result = ssl_expiry_datetime("badssl.com") self.assertEqual(result, self.bad_ssl_valid_cert_date)
def test_ssl_expiry_datetime_mozilla_intermediate(self): ssl_expiry_datetime("mozilla-intermediate.badssl.com")
def test_ssl_expiry_datetime_mozilla_modern(self): ssl_expiry_datetime("mozilla-modern.badssl.com")
def test_ssl_expiry_datetime_mozilla_old(self): ssl_expiry_datetime("mozilla-old.badssl.com")
def test_ssl_expiry_datetime_revoked(self): warning("Should complain about certificate being revoked") ssl_expiry_datetime("revoked.badssl.com")
def test_ssl_expiry_datetime_untrusted_root(self): with self.assertRaises(ssl.SSLError): warning("Should not throw ssl.SSLError") ssl_expiry_datetime("untrusted-root.badssl.com")
def test_ssl_expiry_datetime_self_signed(self): with self.assertRaises(ssl.SSLError): warning("Should not throw ssl.SSLError") ssl_expiry_datetime("self-signed.badssl.com")
def test_ssl_expiry_datetime_wrong_host(self): with self.assertRaises(ssl.CertificateError): warning("Should not throw ssl.CertificateError") ssl_expiry_datetime("wrong.host.badssl.com")