Skip to content

Commit

Permalink
Merge pull request #1125 from dingensundso/dev
Browse files Browse the repository at this point in the history
fix using ServerPools with MOCK_* strategy
  • Loading branch information
cannatag committed Mar 19, 2024
2 parents 9dfbb14 + a6a346d commit d5451f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ldap3/core/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ def __init__(self,
if isinstance(server, ServerPool):
self.server_pool = server
self.server_pool.initialize(self)
if self.strategy_type in [MOCK_SYNC,MOCK_ASYNC]:
for server in self.server_pool.servers:
server.check_availability = lambda *_args, **_kwargs: True
self.server = self.server_pool.get_current_server(self)
else:
self.server_pool = None
Expand Down

0 comments on commit d5451f8

Please sign in to comment.