summaryrefslogtreecommitdiff
path: root/test/testTls.py
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2020-11-30 12:16:10 +0100
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2020-11-30 12:16:10 +0100
commitd7ea1d4c872a0ef39cce7a6bb6d2b9c9fd6c205e (patch)
tree509fcc27647de80e229c24babd4685ba04b45802 /test/testTls.py
parent2bcee5c91d65796532aef1b15f6c8c0c16197aee (diff)
parent96fb2df0e33b34a4dbb75577de8589a8611759c4 (diff)
Update upstream source from tag 'upstream/2.8.1'
Update to upstream version '2.8.1' with Debian dir 4d1ac29b7ae225ca99fb367a07e2e8183bc94036
Diffstat (limited to 'test/testTls.py')
-rw-r--r--test/testTls.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/testTls.py b/test/testTls.py
index 891a3e6..0e85940 100644
--- a/test/testTls.py
+++ b/test/testTls.py
@@ -28,14 +28,14 @@ import ssl
from ldap3 import Server, Connection, ServerPool, Tls, SASL, EXTERNAL, MOCK_ASYNC, MOCK_SYNC
from test.config import test_server, test_port, test_port_ssl, test_user, test_password, test_authentication, \
- test_strategy, test_lazy_connection, test_get_info, test_server_mode, test_valid_names, \
+ test_strategy, test_lazy_connection, test_get_info, test_server_mode, test_valid_names, test_server_type,\
test_pooling_strategy, test_pooling_active, test_pooling_exhaust, test_ca_cert_file, \
test_user_cert_file, test_user_key_file
class Test(unittest.TestCase):
def test_start_tls(self):
- if test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
+ if test_server_type != 'NONE' and test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
if isinstance(test_server, (list, tuple)):
server = ServerPool(pool_strategy=test_pooling_strategy, active=test_pooling_active, exhaust=test_pooling_exhaust)
for host in test_server:
@@ -51,7 +51,7 @@ class Test(unittest.TestCase):
connection.strategy.terminate()
def test_open_ssl_with_defaults(self):
- if test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
+ if test_server_type != 'NONE' and test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
if isinstance(test_server, (list, tuple)):
server = ServerPool(pool_strategy=test_pooling_strategy, active=test_pooling_active, exhaust=test_pooling_exhaust)
for host in test_server:
@@ -66,7 +66,7 @@ class Test(unittest.TestCase):
connection.strategy.terminate()
def test_open_with_tls_before_bind(self):
- if test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
+ if test_server_type != 'NONE' and test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
if isinstance(test_server, (list, tuple)):
server = ServerPool(pool_strategy=test_pooling_strategy, active=test_pooling_active, exhaust=test_pooling_exhaust)
for host in test_server:
@@ -84,7 +84,7 @@ class Test(unittest.TestCase):
self.assertFalse(connection.bound)
def test_open_with_tls_after_bind(self):
- if test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
+ if test_server_type != 'NONE' and test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
if isinstance(test_server, (list, tuple)):
server = ServerPool(pool_strategy=test_pooling_strategy, active=test_pooling_active, exhaust=test_pooling_exhaust)
for host in test_server:
@@ -144,7 +144,7 @@ class Test(unittest.TestCase):
# self.assertFalse(connection.bound)
def test_bind_ssl_cert_none(self):
- if test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
+ if test_server_type != 'NONE' and test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
tls = Tls(validate=ssl.CERT_NONE)
if isinstance(test_server, (list, tuple)):
server = ServerPool(pool_strategy=test_pooling_strategy, active=test_pooling_active, exhaust=test_pooling_exhaust)
@@ -166,7 +166,7 @@ class Test(unittest.TestCase):
# ciphers = '!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2'
ciphers = 'HIGH:!aNULL:!RC4:!DSS'
- if test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
+ if test_server_type != 'NONE' and test_strategy not in [MOCK_SYNC, MOCK_ASYNC]:
if isinstance(test_server, (list, tuple)):
server = ServerPool(pool_strategy=test_pooling_strategy, active=test_pooling_active, exhaust=test_pooling_exhaust)
for host in test_server: