~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/client/tests/test_client.py

Merged silence-deprecation-warnings [r=oubiwann] [f=768311]

Exception.message is no longer accessed which silences deprecation
warnings in Python 2.6.  Variables are explicitly compared with None
which silences deprecation warnings in Python 2.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        failure = Failure(Exception("timeout"))
42
42
        error = self.assertRaises(Exception, error_wrapper, failure, None)
43
43
        self.assertTrue(isinstance(error, Exception))
44
 
        self.assertEquals(error.message, "timeout")
 
44
        self.assertEquals(str(error), "timeout")
45
45
 
46
46
    def test_connection_error(self):
47
47
        failure = Failure(ConnectionRefusedError("timeout"))