~jimbaker/pyjuju/juju-get-cli-use-yaml-null

« back to all changes in this revision

Viewing changes to juju/tests/test_errors.py

  • Committer: Martin Packman
  • Date: 2012-08-28 14:42:54 UTC
  • mfrom: (562.3.2 os_https_pretty_error)
  • Revision ID: martin.packman@canonical.com-20120828144254-q4h2shp1x4g1i5nx
Raise user friendly error on https cert validation failure [r=hazmat,jimbaker]

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        self.assertEquals(str(error), "Cannot upgrade charm: blah blah")
154
154
 
155
155
    def test_SSLVerificationError(self):
156
 
        error = SSLVerificationError("endpoint")
 
156
        orig_error = Exception()
 
157
        error = SSLVerificationError(orig_error)
157
158
        self.assertIsJujuError(error)
158
 
        self.assertEquals(str(error),
159
 
                "An SSL endpoint failed verification: endpoint")
 
159
        self.assertIs(orig_error, error.ssl_error)
 
160
        self.assertIn("Bad HTTPS certificate", str(error))