r46881 - failing test
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Tue Mar 1 00:33:14 2016
New Revision: 46881
Modified:
branches/cert-chain-reg-8222/twisted/internet/test/test_endpoints.py
Log:
failing test
Modified: branches/cert-chain-reg-8222/twisted/internet/test/test_endpoints.py
==============================================================================
--- branches/cert-chain-reg-8222/twisted/internet/test/test_endpoints.py (original)
+++ branches/cert-chain-reg-8222/twisted/internet/test/test_endpoints.py Tue Mar 1 00:33:14 2016
@@ -2575,15 +2575,20 @@
# The endpoint string is the same as in the valid case except for
# a different chain file. We use an empty temp file which obviously
# will never contain any certificates.
- self.assertRaises(
- ValueError,
- endpoints.serverFromString,
- object(),
- self.SSL_CHAIN_TEMPLATE % (
- escapedPEMPathName,
- endpoints.quoteStringArgument(fp.path),
+ with self.assertRaises(ValueError) as caught:
+ endpoints.serverFromString(
+ object(),
+ self.SSL_CHAIN_TEMPLATE % (
+ escapedPEMPathName,
+ endpoints.quoteStringArgument(fp.path),
+ )
)
- )
+
+ # The raised exception should list what file it is attempting to find
+ # the chain in.
+ self.assertEqual(str(caught.exception),
+ ("Specified chain file '%s' doesn't contain any valid"
+ " certificates in PEM format.") % (fp.path,))
def test_sslDHparameters(self):