Check if ValueError assert works old way

This commit is contained in:
sayali 2020-11-02 18:29:22 -08:00
parent 6922d34825
commit b75bd56546

View File

@ -130,8 +130,9 @@ class TestAcme(unittest.TestCase):
mock_authz.dns_challenge = []
dns_challenge = Mock()
mock_authz.dns_challenge.append(dns_challenge)
with self.assertRaises(ValueError):
self.acme.complete_dns_challenge(mock_acme, mock_authz)
# with self.assertRaises(ValueError):
# self.acme.complete_dns_challenge(mock_acme, mock_authz)
self.assertRaises(ValueError, self.acme.complete_dns_challenge(mock_acme, mock_authz))
@patch("acme.client.Client")
@patch("OpenSSL.crypto", return_value="mock_cert")