Exemplo n.º 1
0
 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')
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)