'If C{extraCertChain} is passed, it has to contain at least one valid
certificate in PEM format.'

def test_sslChainFileMustContainCert(self):

    fp = FilePath(self.mktemp())
    fp.create().close()
    with self.assertRaises(ValueError) as caught:
        endpoints.serverFromString(object(), (self.SSL_CHAIN_TEMPLATE % (escapedPEMPathName, endpoints.quoteStringArgument(fp.path))))
    self.assertEqual(str(caught.exception), ("Specified    chain    file    '%s'    doesn't    contain    any    valid    certificates    in    PEM    format." % (fp.path,)))
