def test_unicode(self): ssl = SSL() ssl.ca_certificate = 'test-ca' ssl.client_key = 'test-key' ssl.client_certificate = 'test-cert' self.assertEqual( unicode(ssl), 'ca: test-ca|key: test-key|certificate: test-cert|host-validation: False')
def test_non_zero(self): ssl = SSL() self.assertFalse(ssl) ssl = SSL() ssl.ca_certificate = 'ca' self.assertTrue(ssl) ssl.client_certificate = 'client' self.assertTrue(ssl) ssl.client_key = 'key' self.assertTrue(ssl)